(*******************************************
*                                          *
* Graphic Scene Engine, http://glscene.org *
*                                          *
********************************************)

unit Scene.Import.Vulkan;

(*
** Copyright (c) 2015-2017 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**      http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
**
** This header is generated from the Khronos Vulkan XML API Registry.
*)


interface

uses
// Platform-specific libs required by platform window system extensions.
// These are enabled prior to #including "vulkan.h". The same enable then
// controls inclusion of the extension interfaces in vulkan.h.

{$HPPEMIT '#IFDEF WINDOWS'}
{$HPPEMIT '#I <windows.h>'}
{$HPPEMIT '#ENDIF'}

{$IFDEF MSWINDOWS}
   Winapi.Windows,
{$ENDIF}

 System.SysUtils;

{$IFDEF MSWINDOWS}
const
  LIBNAME_VULKAN = 'vulkan-1.dll';
{$ENDIF}

{$IFDEF VK_USE_PLATFORM_ANDROID_KHR}
  LIBNAME_VULKAN = 'libvulkan.so';
{$ENDIF}
{$IFDEF VK_USE_PLATFORM_WAYLAND_KHR}
  LIBNAME_VULKAN = 'libvulkan.so.1';
{$ENDIF}
{$IFDEF VK_USE_PLATFORM_XLIB_KHR}
  LIBNAME_VULKAN = 'libvulkan.so';
{$ENDIF}
{$IFDEF VK_USE_PLATFORM_XCB_KHR}
  LIBNAME_VULKAN = 'libvulkan.so';
{$ENDIF}

function VK_MAKE_VERSION(const major, minor, patch: Integer): Integer;

// Vulkan API version supported by this file
function VK_API_VERSION(): Integer;

function VK_VERSION_MAJOR(version: Cardinal): Integer;
function VK_VERSION_MINOR(version: Cardinal): Integer;
function VK_VERSION_PATCH(version: Cardinal): Integer;


const
  VK_NULL_HANDLE = 0;

type
  PVkHandle = ^TVkHandle;
  TVkHandle = Pointer;

  PPVkChar = ^PVKChar;
  PVKChar = PAnsiChar;
  TVKChar = AnsiChar;

  PVKint8 = ^TVKint8;
  TVKint8 = ShortInt;

  PVKuint8 = ^TVKuint8;
  TVKuint8 = Byte;

  PVKint16 = ^TVKint16;
  TVKint16 = SmallInt;

  PVKuint16 = ^TVKuint16;
  TVKuint16 = Word;

  PVKInt32 = ^TVKInt32;
  TVKInt32 = Longint;

  PVKuint32 = ^TVKUint32;
  TVKUint32 = Cardinal;

  PVKPtrUInt = ^TVkPtrUInt;
  TVKPtrUInt = Uint64;

  PVkPtrInt = ^TVkPtrInt;
  TVkPtrInt = Int64;

  PVKint64 = ^TVKint64;
  TVKint64 = Int64;

  PVKUInt64 = ^TVKUInt64;
  TVKUInt64 = uint64;

  PVkFlags = ^TVkFlags;
  TVkFlags = uint32;

  PVkBool32 = ^TVkBool32;
  TVkBool32 = uint32;

  PVkDeviceSize = ^TVkDeviceSize;
  TVkDeviceSize = uint64;

  PVkSampleMask = ^TVkSampleMask;
  TVkSampleMask = uint32;

  PVKsize = ^TVKsize;
  TVKsize = NativeUInt;

  PVKFloat = ^TVKFloat;
  TVKFloat = Single;


type
  PPVkInstance = ^PVkInstance;
  PVkInstance = ^TVkInstance;
  TVkInstance = TVkPtrUInt;

  PPVkPhysicalDevice = ^PVkPhysicalDevice;
  PVkPhysicalDevice = ^TVkPhysicalDevice;
  TVkPhysicalDevice = TVkPtrUInt;

  PPVkDevice = ^PVkDevice;
  PVkDevice = ^TVkDevice;
  TVkDevice = TVkPtrUInt;

  PPVkQueue = ^PVkQueue;
  PVkQueue = ^TVkQueue;
  TVkQueue = TVkPtrUInt;

  PPVkSemaphore = ^PVkSemaphore;
  PVkSemaphore = ^TVkSemaphore;
  TVkSemaphore = TVkUInt64;

  PPVkCommandBuffer = ^PVkCommandBuffer;
  PVkCommandBuffer = ^TVkCommandBuffer;
  TVkCommandBuffer = TVkPtrUInt;

  PPVkFence = ^PVkFence;
  PVkFence = ^TVkFence;
  TVkFence = TVkUInt64;

  PPVkDeviceMemory = ^PVkDeviceMemory;
  PVkDeviceMemory = ^TVkDeviceMemory;
  TVkDeviceMemory = TVkUInt64;

  PPVkBuffer = ^PVkBuffer;
  PVkBuffer = ^TVkBuffer;
  TVkBuffer = TVkUInt64;

  PPVkImage = ^PVkImage;
  PVkImage = ^TVkImage;
  TVkImage = TVkUInt64;

  PPVkEvent = ^PVkEvent;
  PVkEvent = ^TVkEvent;
  TVkEvent = TVkUInt64;

  PPVkQueryPool = ^PVkQueryPool;
  PVkQueryPool = ^TVkQueryPool;
  TVkQueryPool = TVkUInt64;

  PPVkBufferView = ^PVkBufferView;
  PVkBufferView = ^TVkBufferView;
  TVkBufferView = TVkUInt64;

  PPVkImageView = ^PVkImageView;
  PVkImageView = ^TVkImageView;
  TVkImageView = TVkUInt64;

  PPVkShaderModule = ^PVkShaderModule;
  PVkShaderModule = ^TVkShaderModule;
  TVkShaderModule = TVkUInt64;

  PPVkPipelineCache = ^PVkPipelineCache;
  PVkPipelineCache = ^TVkPipelineCache;
  TVkPipelineCache = TVkUInt64;

  PPVkPipelineLayout = ^PVkPipelineLayout;
  PVkPipelineLayout = ^TVkPipelineLayout;
  TVkPipelineLayout = TVkUInt64;

  PPVkRenderPass = ^PVkRenderPass;
  PVkRenderPass = ^TVkRenderPass;
  TVkRenderPass = TVkUInt64;

  PPVkPipeline = ^PVkPipeline;
  PVkPipeline = ^TVkPipeline;
  TVkPipeline = TVkUInt64;

  PPVkDescriptorSetLayout = ^PVkDescriptorSetLayout;
  PVkDescriptorSetLayout = ^TVkDescriptorSetLayout;
  TVkDescriptorSetLayout = TVkUInt64;

  PPVkSampler = ^PVkSampler;
  PVkSampler = ^TVkSampler;
  TVkSampler = TVkUInt64;

  PPVkDescriptorPool = ^PVkDescriptorPool;
  PVkDescriptorPool = ^TVkDescriptorPool;
  TVkDescriptorPool = TVkUInt64;

  PPVkDescriptorSet = ^PVkDescriptorSet;
  PVkDescriptorSet = ^TVkDescriptorSet;
  TVkDescriptorSet = TVkUInt64;

  PPVkFramebuffer = ^PVkFramebuffer;
  PVkFramebuffer = ^TVkFramebuffer;
  TVkFramebuffer = TVkUInt64;

  PPVkCommandPool = ^PVkCommandPool;
  PVkCommandPool = ^TVkCommandPool;
  TVkCommandPool = TVkUInt64;

const
  {$EXTERNALSYM VK_LOD_CLAMP_NONE}
  VK_LOD_CLAMP_NONE =                                1000.0;
  {$EXTERNALSYM VK_REMAINING_MIP_LEVELS}
  VK_REMAINING_MIP_LEVELS =                       $FFFFFFFF;
  {$EXTERNALSYM VK_REMAINING_ARRAY_LAYERS}
  VK_REMAINING_ARRAY_LAYERS =                     $FFFFFFFF;
  {$EXTERNALSYM VK_WHOLE_SIZE}
  VK_WHOLE_SIZE =                         $FFFFFFFFFFFFFFFF;
  {$EXTERNALSYM VK_ATTACHMENT_UNUSED}
  VK_ATTACHMENT_UNUSED =                          $FFFFFFFF;
  {$EXTERNALSYM VK_TRUE}
  VK_TRUE =                                               1;
  {$EXTERNALSYM VK_FALSE}
  VK_FALSE =                                              0;
  {$EXTERNALSYM VK_QUEUE_FAMILY_IGNORED}
  VK_QUEUE_FAMILY_IGNORED =                       $FFFFFFFF;
  {$EXTERNALSYM VK_SUBPASS_EXTERNAL}
  VK_SUBPASS_EXTERNAL =                           $FFFFFFFF;
  {$EXTERNALSYM VK_MAX_PHYSICAL_DEVICE_NAME_SIZE}
  VK_MAX_PHYSICAL_DEVICE_NAME_SIZE =                    256;
  {$EXTERNALSYM VK_UUID_SIZE}
  VK_UUID_SIZE =                                         16;
  {$EXTERNALSYM VK_MAX_MEMORY_TYPES}
  VK_MAX_MEMORY_TYPES =                                  32;
  {$EXTERNALSYM VK_MAX_MEMORY_HEAPS}
  VK_MAX_MEMORY_HEAPS =                                  16;
  {$EXTERNALSYM VK_MAX_EXTENSION_NAME_SIZE}
  VK_MAX_EXTENSION_NAME_SIZE =                          256;
  {$EXTERNALSYM VK_MAX_DESCRIPTION_SIZE}
  VK_MAX_DESCRIPTION_SIZE =                             256;

type 
   PVkPipelineCacheHeaderVersion = ^TVkPipelineCacheHeaderVersion;
   TVkPipelineCacheHeaderVersion = (
    VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1,
    VK_PIPELINE_CACHE_HEADER_VERSION_BEGIN_RANGE = VK_PIPELINE_CACHE_HEADER_VERSION_ONE,
    VK_PIPELINE_CACHE_HEADER_VERSION_END_RANGE = VK_PIPELINE_CACHE_HEADER_VERSION_ONE,
    VK_PIPELINE_CACHE_HEADER_VERSION_RANGE_SIZE = (VK_PIPELINE_CACHE_HEADER_VERSION_ONE - VK_PIPELINE_CACHE_HEADER_VERSION_ONE + 1),
    VK_PIPELINE_CACHE_HEADER_VERSION_MAX_ENUM = $7FFFFFFF); 

  PVkResult = ^TVkResult;
  TVkResult = (
    VK_SUCCESS = 0,
    VK_NOT_READY = 1,
    VK_TIMEOUT = 2,
    VK_EVENT_SET = 3,
    VK_EVENT_RESET = 4,
    VK_INCOMPLETE = 5,
    VK_ERROR_OUT_OF_HOST_MEMORY = -1,
    VK_ERROR_OUT_OF_DEVICE_MEMORY = -2,
    VK_ERROR_INITIALIZATION_FAILED = -3,
    VK_ERROR_DEVICE_LOST = -4,
    VK_ERROR_MEMORY_MAP_FAILED = -5,
    VK_ERROR_LAYER_NOT_PRESENT = -6,
    VK_ERROR_EXTENSION_NOT_PRESENT = -7,
    VK_ERROR_FEATURE_NOT_PRESENT = -8,
    VK_ERROR_INCOMPATIBLE_DRIVER = -9,
    VK_ERROR_TOO_MANY_OBJECTS = -10,
    VK_ERROR_FORMAT_NOT_SUPPORTED = -11,
    VK_ERROR_FRAGMENTED_POOL = -12,
    VK_ERROR_SURFACE_LOST_KHR = -1000000000,
    VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = -1000000001,
    VK_SUBOPTIMAL_KHR = 1000001003,
    VK_ERROR_OUT_OF_DATE_KHR = -1000001004,
    VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = -1000003001,
    VK_ERROR_VALIDATION_FAILED_EXT = -1000011001,
    VK_ERROR_INVALID_SHADER_NV = -1000012000,
    VK_ERROR_OUT_OF_POOL_MEMORY_KHR = -1000069000,
    VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX = -1000072003,
    VK_RESULT_BEGIN_RANGE = VK_ERROR_FRAGMENTED_POOL,
    VK_RESULT_END_RANGE = VK_INCOMPLETE,
    VK_RESULT_RANGE_SIZE = (VK_INCOMPLETE - VK_ERROR_FRAGMENTED_POOL + 1),
    VK_RESULT_MAX_ENUM = $7FFFFFFF);


  PVkStructureType = ^TVkStructureType;
  TVkStructureType = (    VK_STRUCTURE_TYPE_APPLICATION_INFO = 0,
    VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1,
    VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2,
    VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3,
    VK_STRUCTURE_TYPE_SUBMIT_INFO = 4,
    VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5,
    VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6,
    VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7,
    VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8,
    VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9,
    VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10,
    VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11,
    VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12,
    VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13,
    VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14,
    VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15,
    VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16,
    VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17,
    VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18,
    VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19,
    VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20,
    VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21,
    VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22,
    VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23,
    VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24,
    VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25,
    VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26,
    VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27,
    VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28,
    VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29,
    VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30,
    VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31,
    VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32,
    VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33,
    VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34,
    VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35,
    VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36,
    VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37,
    VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38,
    VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39,
    VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40,
    VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41,
    VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42,
    VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43,
    VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44,
    VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45,
    VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46,
    VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47,
    VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48,
    VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000,
    VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001,
    VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000,
    VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001,
    VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR = 1000003000,
    VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000,
    VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000,
    VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000,
    VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR = 1000007000,
    VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000,
    VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000,
    VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000,
    VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000,
    VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000,
    VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001,
    VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002,
    VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000,
    VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001,
    VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002,
    VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHX = 1000053000,
    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHX = 1000053001,
    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHX = 1000053002,
    VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000,
    VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001,
    VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000,
    VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001,
    VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000,
    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000,
    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001,
    VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = 1000059002,
    VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059003,
    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = 1000059004,
    VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = 1000059005,
    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006,
    VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007,
    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008,
    VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHX = 1000060000,
    VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHX = 1000060001,
    VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHX = 1000060002,
    VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHX = 1000060003,
    VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHX = 1000060004,
    VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHX = 1000060005,
    VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHX = 1000060006,
    VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHX = 1000060007,
    VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHX = 1000060008,
    VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHX = 1000060009,
    VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX = 1000060010,
    VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHX = 1000060011,
    VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHX = 1000060012,
    VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000,
    VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN = 1000062000,
    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHX = 1000070000,
    VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX = 1000070001,
    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHX = 1000071000,
    VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHX = 1000071001,
    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHX = 1000071002,
    VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHX = 1000071003,
    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHX = 1000071004,
    VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHX = 1000072000,
    VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHX = 1000072001,
    VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHX = 1000072002,
    VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHX = 1000073000,
    VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHX = 1000073001,
    VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHX = 1000073002,
    VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHX = 1000074000,
    VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHX = 1000074001,
    VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHX = 1000075000,
    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHX = 1000076000,
    VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHX = 1000076001,
    VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHX = 1000077000,
    VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX = 1000078000,
    VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX = 1000078001,
    VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHX = 1000078002,
    VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHX = 1000079000,
    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = 1000080000,
    VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000,
    VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = 1000085000,
    VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000,
    VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001,
    VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX = 1000086002,
    VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX = 1000086003,
    VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004,
    VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005,
    VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000,
    VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT = 1000090000,
    VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000,
    VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001,
    VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002,
    VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003,
    VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE = 1000092000,
    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000,
    VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000,
    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000,
    VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001,
    VK_STRUCTURE_TYPE_HDR_METADATA_EXT = 1000105000,
    VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000,
    VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000,
    VK_STRUCTURE_TYPE_BEGIN_RANGE = VK_STRUCTURE_TYPE_APPLICATION_INFO,
    VK_STRUCTURE_TYPE_END_RANGE = VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO,
    VK_STRUCTURE_TYPE_RANGE_SIZE = (VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO - VK_STRUCTURE_TYPE_APPLICATION_INFO + 1),
    VK_STRUCTURE_TYPE_MAX_ENUM = $7FFFFFFF);

  PVkSystemAllocationScope = ^TVkSystemAllocationScope;
  TVkSystemAllocationScope = (
    VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0,
    VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 1,
    VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 2,
    VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 3,
    VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 4,
    VK_SYSTEM_ALLOCATION_SCOPE_BEGIN_RANGE = VK_SYSTEM_ALLOCATION_SCOPE_COMMAND,
    VK_SYSTEM_ALLOCATION_SCOPE_END_RANGE = VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE,
    VK_SYSTEM_ALLOCATION_SCOPE_RANGE_SIZE = (VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE - VK_SYSTEM_ALLOCATION_SCOPE_COMMAND + 1),
    VK_SYSTEM_ALLOCATION_SCOPE_MAX_ENUM = $7FFFFFFF);


  PVkInternalAllocationType = ^TVkInternalAllocationType;  TVkInternalAllocationType = (
    VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0,
    VK_INTERNAL_ALLOCATION_TYPE_BEGIN_RANGE = VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE,
    VK_INTERNAL_ALLOCATION_TYPE_END_RANGE = VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE,
    VK_INTERNAL_ALLOCATION_TYPE_RANGE_SIZE = (VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE - VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE + 1),
    VK_INTERNAL_ALLOCATION_TYPE_MAX_ENUM = $7FFFFFFF);


  PVkFormat = ^TVkFormat;
  TVkFormat = (
    VK_FORMAT_UNDEFINED = 0,
    VK_FORMAT_R4G4_UNORM_PACK8 = 1,
    VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2,
    VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3,
    VK_FORMAT_R5G6B5_UNORM_PACK16 = 4,
    VK_FORMAT_B5G6R5_UNORM_PACK16 = 5,
    VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6,
    VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7,
    VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8,
    VK_FORMAT_R8_UNORM = 9,
    VK_FORMAT_R8_SNORM = 10,
    VK_FORMAT_R8_USCALED = 11,
    VK_FORMAT_R8_SSCALED = 12,
    VK_FORMAT_R8_UINT = 13,
    VK_FORMAT_R8_SINT = 14,
    VK_FORMAT_R8_SRGB = 15,
    VK_FORMAT_R8G8_UNORM = 16,
    VK_FORMAT_R8G8_SNORM = 17,
    VK_FORMAT_R8G8_USCALED = 18,
    VK_FORMAT_R8G8_SSCALED = 19,
    VK_FORMAT_R8G8_UINT = 20,
    VK_FORMAT_R8G8_SINT = 21,
    VK_FORMAT_R8G8_SRGB = 22,
    VK_FORMAT_R8G8B8_UNORM = 23,
    VK_FORMAT_R8G8B8_SNORM = 24,
    VK_FORMAT_R8G8B8_USCALED = 25,
    VK_FORMAT_R8G8B8_SSCALED = 26,
    VK_FORMAT_R8G8B8_UINT = 27,
    VK_FORMAT_R8G8B8_SINT = 28,
    VK_FORMAT_R8G8B8_SRGB = 29,
    VK_FORMAT_B8G8R8_UNORM = 30,
    VK_FORMAT_B8G8R8_SNORM = 31,
    VK_FORMAT_B8G8R8_USCALED = 32,
    VK_FORMAT_B8G8R8_SSCALED = 33,
    VK_FORMAT_B8G8R8_UINT = 34,
    VK_FORMAT_B8G8R8_SINT = 35,
    VK_FORMAT_B8G8R8_SRGB = 36,
    VK_FORMAT_R8G8B8A8_UNORM = 37,
    VK_FORMAT_R8G8B8A8_SNORM = 38,
    VK_FORMAT_R8G8B8A8_USCALED = 39,
    VK_FORMAT_R8G8B8A8_SSCALED = 40,
    VK_FORMAT_R8G8B8A8_UINT = 41,
    VK_FORMAT_R8G8B8A8_SINT = 42,
    VK_FORMAT_R8G8B8A8_SRGB = 43,
    VK_FORMAT_B8G8R8A8_UNORM = 44,
    VK_FORMAT_B8G8R8A8_SNORM = 45,
    VK_FORMAT_B8G8R8A8_USCALED = 46,
    VK_FORMAT_B8G8R8A8_SSCALED = 47,
    VK_FORMAT_B8G8R8A8_UINT = 48,
    VK_FORMAT_B8G8R8A8_SINT = 49,
    VK_FORMAT_B8G8R8A8_SRGB = 50,
    VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51,
    VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52,
    VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53,
    VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54,
    VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55,
    VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56,
    VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57,
    VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58,
    VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59,
    VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60,
    VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61,
    VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62,
    VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63,
    VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64,
    VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65,
    VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66,
    VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67,
    VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68,
    VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69,
    VK_FORMAT_R16_UNORM = 70,
    VK_FORMAT_R16_SNORM = 71,
    VK_FORMAT_R16_USCALED = 72,
    VK_FORMAT_R16_SSCALED = 73,
    VK_FORMAT_R16_UINT = 74,
    VK_FORMAT_R16_SINT = 75,
    VK_FORMAT_R16_SFLOAT = 76,
    VK_FORMAT_R16G16_UNORM = 77,
    VK_FORMAT_R16G16_SNORM = 78,
    VK_FORMAT_R16G16_USCALED = 79,
    VK_FORMAT_R16G16_SSCALED = 80,
    VK_FORMAT_R16G16_UINT = 81,
    VK_FORMAT_R16G16_SINT = 82,
    VK_FORMAT_R16G16_SFLOAT = 83,
    VK_FORMAT_R16G16B16_UNORM = 84,
    VK_FORMAT_R16G16B16_SNORM = 85,
    VK_FORMAT_R16G16B16_USCALED = 86,
    VK_FORMAT_R16G16B16_SSCALED = 87,
    VK_FORMAT_R16G16B16_UINT = 88,
    VK_FORMAT_R16G16B16_SINT = 89,
    VK_FORMAT_R16G16B16_SFLOAT = 90,
    VK_FORMAT_R16G16B16A16_UNORM = 91,
    VK_FORMAT_R16G16B16A16_SNORM = 92,
    VK_FORMAT_R16G16B16A16_USCALED = 93,
    VK_FORMAT_R16G16B16A16_SSCALED = 94,
    VK_FORMAT_R16G16B16A16_UINT = 95,
    VK_FORMAT_R16G16B16A16_SINT = 96,
    VK_FORMAT_R16G16B16A16_SFLOAT = 97,
    VK_FORMAT_R32_UINT = 98,
    VK_FORMAT_R32_SINT = 99,
    VK_FORMAT_R32_SFLOAT = 100,
    VK_FORMAT_R32G32_UINT = 101,
    VK_FORMAT_R32G32_SINT = 102,
    VK_FORMAT_R32G32_SFLOAT = 103,
    VK_FORMAT_R32G32B32_UINT = 104,
    VK_FORMAT_R32G32B32_SINT = 105,
    VK_FORMAT_R32G32B32_SFLOAT = 106,
    VK_FORMAT_R32G32B32A32_UINT = 107,
    VK_FORMAT_R32G32B32A32_SINT = 108,
    VK_FORMAT_R32G32B32A32_SFLOAT = 109,
    VK_FORMAT_R64_UINT = 110,
    VK_FORMAT_R64_SINT = 111,
    VK_FORMAT_R64_SFLOAT = 112,
    VK_FORMAT_R64G64_UINT = 113,
    VK_FORMAT_R64G64_SINT = 114,
    VK_FORMAT_R64G64_SFLOAT = 115,
    VK_FORMAT_R64G64B64_UINT = 116,
    VK_FORMAT_R64G64B64_SINT = 117,
    VK_FORMAT_R64G64B64_SFLOAT = 118,
    VK_FORMAT_R64G64B64A64_UINT = 119,
    VK_FORMAT_R64G64B64A64_SINT = 120,
    VK_FORMAT_R64G64B64A64_SFLOAT = 121,
    VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122,
    VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123,
    VK_FORMAT_D16_UNORM = 124,
    VK_FORMAT_X8_D24_UNORM_PACK32 = 125,
    VK_FORMAT_D32_SFLOAT = 126,
    VK_FORMAT_S8_UINT = 127,
    VK_FORMAT_D16_UNORM_S8_UINT = 128,
    VK_FORMAT_D24_UNORM_S8_UINT = 129,
    VK_FORMAT_D32_SFLOAT_S8_UINT = 130,
    VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131,
    VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132,
    VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133,
    VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134,
    VK_FORMAT_BC2_UNORM_BLOCK = 135,
    VK_FORMAT_BC2_SRGB_BLOCK = 136,
    VK_FORMAT_BC3_UNORM_BLOCK = 137,
    VK_FORMAT_BC3_SRGB_BLOCK = 138,
    VK_FORMAT_BC4_UNORM_BLOCK = 139,
    VK_FORMAT_BC4_SNORM_BLOCK = 140,
    VK_FORMAT_BC5_UNORM_BLOCK = 141,
    VK_FORMAT_BC5_SNORM_BLOCK = 142,
    VK_FORMAT_BC6H_UFLOAT_BLOCK = 143,
    VK_FORMAT_BC6H_SFLOAT_BLOCK = 144,
    VK_FORMAT_BC7_UNORM_BLOCK = 145,
    VK_FORMAT_BC7_SRGB_BLOCK = 146,
    VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147,
    VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148,
    VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149,
    VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150,
    VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151,
    VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152,
    VK_FORMAT_EAC_R11_UNORM_BLOCK = 153,
    VK_FORMAT_EAC_R11_SNORM_BLOCK = 154,
    VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155,
    VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156,
    VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157,
    VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158,
    VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159,
    VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160,
    VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161,
    VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162,
    VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163,
    VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164,
    VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165,
    VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166,
    VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167,
    VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168,
    VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169,
    VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170,
    VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171,
    VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172,
    VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173,
    VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174,
    VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175,
    VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176,
    VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177,
    VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178,
    VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179,
    VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180,
    VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181,
    VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182,
    VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183,
    VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184,
    VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000,
    VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001,
    VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002,
    VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003,
    VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004,
    VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005,
    VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006,
    VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007,
    VK_FORMAT_BEGIN_RANGE = VK_FORMAT_UNDEFINED,
    VK_FORMAT_END_RANGE = VK_FORMAT_ASTC_12x12_SRGB_BLOCK,
    VK_FORMAT_RANGE_SIZE = (VK_FORMAT_ASTC_12x12_SRGB_BLOCK - VK_FORMAT_UNDEFINED + 1),
    VK_FORMAT_MAX_ENUM = $7FFFFFFF);
 

  PVkImageType = ^TVkImageType;  TVkImageType = (
    VK_IMAGE_TYPE_1D = 0,
    VK_IMAGE_TYPE_2D = 1,
    VK_IMAGE_TYPE_3D = 2,
    VK_IMAGE_TYPE_BEGIN_RANGE = VK_IMAGE_TYPE_1D,
    VK_IMAGE_TYPE_END_RANGE = VK_IMAGE_TYPE_3D,
    VK_IMAGE_TYPE_RANGE_SIZE = (VK_IMAGE_TYPE_3D - VK_IMAGE_TYPE_1D + 1),
    VK_IMAGE_TYPE_MAX_ENUM = $7FFFFFFF);


  PVkImageTiling = ^TVkImageTiling;  TVkImageTiling = (
    VK_IMAGE_TILING_OPTIMAL = 0,
    VK_IMAGE_TILING_LINEAR = 1,
    VK_IMAGE_TILING_BEGIN_RANGE = VK_IMAGE_TILING_OPTIMAL,
    VK_IMAGE_TILING_END_RANGE = VK_IMAGE_TILING_LINEAR,
    VK_IMAGE_TILING_RANGE_SIZE = (VK_IMAGE_TILING_LINEAR - VK_IMAGE_TILING_OPTIMAL + 1),
    VK_IMAGE_TILING_MAX_ENUM = $7FFFFFFF);


  PVkPhysicalDeviceType = ^TVkPhysicalDeviceType;  TVkPhysicalDeviceType = (
    VK_PHYSICAL_DEVICE_TYPE_OTHER = 0,
    VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 1,
    VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 2,
    VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 3,
    VK_PHYSICAL_DEVICE_TYPE_CPU = 4,
    VK_PHYSICAL_DEVICE_TYPE_BEGIN_RANGE = VK_PHYSICAL_DEVICE_TYPE_OTHER,
    VK_PHYSICAL_DEVICE_TYPE_END_RANGE = VK_PHYSICAL_DEVICE_TYPE_CPU,
    VK_PHYSICAL_DEVICE_TYPE_RANGE_SIZE = (VK_PHYSICAL_DEVICE_TYPE_CPU - VK_PHYSICAL_DEVICE_TYPE_OTHER + 1),
    VK_PHYSICAL_DEVICE_TYPE_MAX_ENUM = $7FFFFFFF);

  PVkQueryType = ^TVkQueryType;
  TVkQueryType = (
    VK_QUERY_TYPE_OCCLUSION = 0,
    VK_QUERY_TYPE_PIPELINE_STATISTICS = 1,
    VK_QUERY_TYPE_TIMESTAMP = 2,
    VK_QUERY_TYPE_BEGIN_RANGE = VK_QUERY_TYPE_OCCLUSION,
    VK_QUERY_TYPE_END_RANGE = VK_QUERY_TYPE_TIMESTAMP,
    VK_QUERY_TYPE_RANGE_SIZE = (VK_QUERY_TYPE_TIMESTAMP - VK_QUERY_TYPE_OCCLUSION + 1),
    VK_QUERY_TYPE_MAX_ENUM = $7FFFFFFF);

  PVkSharingMode = ^TVkSharingMode;
  TVkSharingMode = (
    VK_SHARING_MODE_EXCLUSIVE = 0,
    VK_SHARING_MODE_CONCURRENT = 1,
    VK_SHARING_MODE_BEGIN_RANGE = VK_SHARING_MODE_EXCLUSIVE,
    VK_SHARING_MODE_END_RANGE = VK_SHARING_MODE_CONCURRENT,
    VK_SHARING_MODE_RANGE_SIZE = (VK_SHARING_MODE_CONCURRENT - VK_SHARING_MODE_EXCLUSIVE + 1),
    VK_SHARING_MODE_MAX_ENUM = $7FFFFFFF);

  PVkImageLayout = ^TVkImageLayout;
  TVkImageLayout = (
    VK_IMAGE_LAYOUT_UNDEFINED = 0,
    VK_IMAGE_LAYOUT_GENERAL = 1,
    VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 2,
    VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 3,
    VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 4,
    VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 5,
    VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 6,
    VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL = 7,
    VK_IMAGE_LAYOUT_PREINITIALIZED = 8,
    VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002,
    VK_IMAGE_LAYOUT_BEGIN_RANGE = VK_IMAGE_LAYOUT_UNDEFINED,
    VK_IMAGE_LAYOUT_END_RANGE = VK_IMAGE_LAYOUT_PREINITIALIZED,
    VK_IMAGE_LAYOUT_RANGE_SIZE = (VK_IMAGE_LAYOUT_PREINITIALIZED - VK_IMAGE_LAYOUT_UNDEFINED + 1),
    VK_IMAGE_LAYOUT_MAX_ENUM = $7FFFFFFF);

  PVkImageViewType = ^TVkImageViewType;
  TVkImageViewType = (
    VK_IMAGE_VIEW_TYPE_1D = 0,
    VK_IMAGE_VIEW_TYPE_2D = 1,
    VK_IMAGE_VIEW_TYPE_3D = 2,
    VK_IMAGE_VIEW_TYPE_CUBE = 3,
    VK_IMAGE_VIEW_TYPE_1D_ARRAY = 4,
    VK_IMAGE_VIEW_TYPE_2D_ARRAY = 5,
    VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 6,
    VK_IMAGE_VIEW_TYPE_BEGIN_RANGE = VK_IMAGE_VIEW_TYPE_1D,
    VK_IMAGE_VIEW_TYPE_END_RANGE = VK_IMAGE_VIEW_TYPE_CUBE_ARRAY,
    VK_IMAGE_VIEW_TYPE_RANGE_SIZE = (VK_IMAGE_VIEW_TYPE_CUBE_ARRAY - VK_IMAGE_VIEW_TYPE_1D + 1),
    VK_IMAGE_VIEW_TYPE_MAX_ENUM = $7FFFFFFF);


  PVkComponentSwizzle = ^TVkComponentSwizzle;
  TVkComponentSwizzle = (
    VK_COMPONENT_SWIZZLE_IDENTITY = 0,
    VK_COMPONENT_SWIZZLE_ZERO = 1,
    VK_COMPONENT_SWIZZLE_ONE = 2,
    VK_COMPONENT_SWIZZLE_R = 3,
    VK_COMPONENT_SWIZZLE_G = 4,
    VK_COMPONENT_SWIZZLE_B = 5,
    VK_COMPONENT_SWIZZLE_A = 6,
    VK_COMPONENT_SWIZZLE_BEGIN_RANGE = VK_COMPONENT_SWIZZLE_IDENTITY,
    VK_COMPONENT_SWIZZLE_END_RANGE = VK_COMPONENT_SWIZZLE_A,
    VK_COMPONENT_SWIZZLE_RANGE_SIZE = (VK_COMPONENT_SWIZZLE_A - VK_COMPONENT_SWIZZLE_IDENTITY + 1),
    VK_COMPONENT_SWIZZLE_MAX_ENUM = $7FFFFFFF);


  PVkVertexInputRate = ^TVkVertexInputRate;
  TVkVertexInputRate = (
    VK_VERTEX_INPUT_RATE_VERTEX = 0,
    VK_VERTEX_INPUT_RATE_INSTANCE = 1,
    VK_VERTEX_INPUT_RATE_BEGIN_RANGE = VK_VERTEX_INPUT_RATE_VERTEX,
    VK_VERTEX_INPUT_RATE_END_RANGE = VK_VERTEX_INPUT_RATE_INSTANCE,
    VK_VERTEX_INPUT_RATE_RANGE_SIZE = (VK_VERTEX_INPUT_RATE_INSTANCE - VK_VERTEX_INPUT_RATE_VERTEX + 1),
    VK_VERTEX_INPUT_RATE_MAX_ENUM = $7FFFFFFF);

  PVkPrimitiveTopology = ^TVkPrimitiveTopology;
  TVkPrimitiveTopology = (
    VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0,
    VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 1,
    VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 2,
    VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 3,
    VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 4,
    VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 5,
    VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 6,
    VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 7,
    VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 8,
    VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 9,
    VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 10,
    VK_PRIMITIVE_TOPOLOGY_BEGIN_RANGE = VK_PRIMITIVE_TOPOLOGY_POINT_LIST,
    VK_PRIMITIVE_TOPOLOGY_END_RANGE = VK_PRIMITIVE_TOPOLOGY_PATCH_LIST,
    VK_PRIMITIVE_TOPOLOGY_RANGE_SIZE = (VK_PRIMITIVE_TOPOLOGY_PATCH_LIST - VK_PRIMITIVE_TOPOLOGY_POINT_LIST + 1),
    VK_PRIMITIVE_TOPOLOGY_MAX_ENUM = $7FFFFFFF);

  PVkPolygonMode = ^TVkPolygonMode;
  TVkPolygonMode = (
    VK_POLYGON_MODE_FILL = 0,
    VK_POLYGON_MODE_LINE = 1,
    VK_POLYGON_MODE_POINT = 2,
    VK_POLYGON_MODE_BEGIN_RANGE = VK_POLYGON_MODE_FILL,
    VK_POLYGON_MODE_END_RANGE = VK_POLYGON_MODE_POINT,
    VK_POLYGON_MODE_RANGE_SIZE = (VK_POLYGON_MODE_POINT - VK_POLYGON_MODE_FILL + 1),
    VK_POLYGON_MODE_MAX_ENUM = $7FFFFFFF);

  PVkFrontFace = ^TVkFrontFace;
  TVkFrontFace = (
    VK_FRONT_FACE_COUNTER_CLOCKWISE = 0,
    VK_FRONT_FACE_CLOCKWISE = 1,
    VK_FRONT_FACE_BEGIN_RANGE = VK_FRONT_FACE_COUNTER_CLOCKWISE,
    VK_FRONT_FACE_END_RANGE = VK_FRONT_FACE_CLOCKWISE,
    VK_FRONT_FACE_RANGE_SIZE = (VK_FRONT_FACE_CLOCKWISE - VK_FRONT_FACE_COUNTER_CLOCKWISE + 1),
    VK_FRONT_FACE_MAX_ENUM = $7FFFFFFF);

  PVkCompareOp = ^TVkCompareOp;
  TVkCompareOp = (
    VK_COMPARE_OP_NEVER = 0,
    VK_COMPARE_OP_LESS = 1,
    VK_COMPARE_OP_EQUAL = 2,
    VK_COMPARE_OP_LESS_OR_EQUAL = 3,
    VK_COMPARE_OP_GREATER = 4,
    VK_COMPARE_OP_NOT_EQUAL = 5,
    VK_COMPARE_OP_GREATER_OR_EQUAL = 6,
    VK_COMPARE_OP_ALWAYS = 7,
    VK_COMPARE_OP_BEGIN_RANGE = VK_COMPARE_OP_NEVER,
    VK_COMPARE_OP_END_RANGE = VK_COMPARE_OP_ALWAYS,
    VK_COMPARE_OP_RANGE_SIZE = (VK_COMPARE_OP_ALWAYS - VK_COMPARE_OP_NEVER + 1),
    VK_COMPARE_OP_MAX_ENUM = $7FFFFFFF);
 
  PVkStencilOp = ^TVkStencilOp;
  TVkStencilOp = (
    VK_STENCIL_OP_KEEP = 0,
    VK_STENCIL_OP_ZERO = 1,
    VK_STENCIL_OP_REPLACE = 2,
    VK_STENCIL_OP_INCREMENT_AND_CLAMP = 3,
    VK_STENCIL_OP_DECREMENT_AND_CLAMP = 4,
    VK_STENCIL_OP_INVERT = 5,
    VK_STENCIL_OP_INCREMENT_AND_WRAP = 6,
    VK_STENCIL_OP_DECREMENT_AND_WRAP = 7,
    VK_STENCIL_OP_BEGIN_RANGE = VK_STENCIL_OP_KEEP,
    VK_STENCIL_OP_END_RANGE = VK_STENCIL_OP_DECREMENT_AND_WRAP,
    VK_STENCIL_OP_RANGE_SIZE = (VK_STENCIL_OP_DECREMENT_AND_WRAP - VK_STENCIL_OP_KEEP + 1),
    VK_STENCIL_OP_MAX_ENUM = $7FFFFFFF);

  PVkLogicOp = ^TVkLogicOp;
  TVkLogicOp = (
    VK_LOGIC_OP_CLEAR = 0,
    VK_LOGIC_OP_AND = 1,
    VK_LOGIC_OP_AND_REVERSE = 2,
    VK_LOGIC_OP_COPY = 3,
    VK_LOGIC_OP_AND_INVERTED = 4,
    VK_LOGIC_OP_NO_OP = 5,
    VK_LOGIC_OP_XOR = 6,
    VK_LOGIC_OP_OR = 7,
    VK_LOGIC_OP_NOR = 8,
    VK_LOGIC_OP_EQUIVALENT = 9,
    VK_LOGIC_OP_INVERT = 10,
    VK_LOGIC_OP_OR_REVERSE = 11,
    VK_LOGIC_OP_COPY_INVERTED = 12,
    VK_LOGIC_OP_OR_INVERTED = 13,
    VK_LOGIC_OP_NAND = 14,
    VK_LOGIC_OP_SET = 15,
    VK_LOGIC_OP_BEGIN_RANGE = VK_LOGIC_OP_CLEAR,
    VK_LOGIC_OP_END_RANGE = VK_LOGIC_OP_SET,
    VK_LOGIC_OP_RANGE_SIZE = (VK_LOGIC_OP_SET - VK_LOGIC_OP_CLEAR + 1),
    VK_LOGIC_OP_MAX_ENUM = $7FFFFFFF);

  PVkBlendFactor = ^TVkBlendFactor;
  TVkBlendFactor = (
    VK_BLEND_FACTOR_ZERO = 0,
    VK_BLEND_FACTOR_ONE = 1,
    VK_BLEND_FACTOR_SRC_COLOR = 2,
    VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 3,
    VK_BLEND_FACTOR_DST_COLOR = 4,
    VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 5,
    VK_BLEND_FACTOR_SRC_ALPHA = 6,
    VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 7,
    VK_BLEND_FACTOR_DST_ALPHA = 8,
    VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 9,
    VK_BLEND_FACTOR_CONSTANT_COLOR = 10,
    VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 11,
    VK_BLEND_FACTOR_CONSTANT_ALPHA = 12,
    VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 13,
    VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 14,
    VK_BLEND_FACTOR_SRC1_COLOR = 15,
    VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 16,
    VK_BLEND_FACTOR_SRC1_ALPHA = 17,
    VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 18,
    VK_BLEND_FACTOR_BEGIN_RANGE = VK_BLEND_FACTOR_ZERO,
    VK_BLEND_FACTOR_END_RANGE = VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA,
    VK_BLEND_FACTOR_RANGE_SIZE = (VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA - VK_BLEND_FACTOR_ZERO + 1),
    VK_BLEND_FACTOR_MAX_ENUM = $7FFFFFFF);

  PVkBlendOp = ^TVkBlendOp;
  TVkBlendOp = (
    VK_BLEND_OP_ADD = 0,
    VK_BLEND_OP_SUBTRACT = 1,
    VK_BLEND_OP_REVERSE_SUBTRACT = 2,
    VK_BLEND_OP_MIN = 3,
    VK_BLEND_OP_MAX = 4,
    VK_BLEND_OP_BEGIN_RANGE = VK_BLEND_OP_ADD,
    VK_BLEND_OP_END_RANGE = VK_BLEND_OP_MAX,
    VK_BLEND_OP_RANGE_SIZE = (VK_BLEND_OP_MAX - VK_BLEND_OP_ADD + 1),
    VK_BLEND_OP_MAX_ENUM = $7FFFFFFF);

  PVkDynamicState = ^TVkDynamicState;
  TVkDynamicState = (
    VK_DYNAMIC_STATE_VIEWPORT = 0,
    VK_DYNAMIC_STATE_SCISSOR = 1,
    VK_DYNAMIC_STATE_LINE_WIDTH = 2,
    VK_DYNAMIC_STATE_DEPTH_BIAS = 3,
    VK_DYNAMIC_STATE_BLEND_CONSTANTS = 4,
    VK_DYNAMIC_STATE_DEPTH_BOUNDS = 5,
    VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 6,
    VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 7,
    VK_DYNAMIC_STATE_STENCIL_REFERENCE = 8,
    VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000,
    VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000,
    VK_DYNAMIC_STATE_BEGIN_RANGE = VK_DYNAMIC_STATE_VIEWPORT,
    VK_DYNAMIC_STATE_END_RANGE = VK_DYNAMIC_STATE_STENCIL_REFERENCE,
    VK_DYNAMIC_STATE_RANGE_SIZE = (VK_DYNAMIC_STATE_STENCIL_REFERENCE - VK_DYNAMIC_STATE_VIEWPORT + 1),
    VK_DYNAMIC_STATE_MAX_ENUM = $7FFFFFFF);

  PVkFilter = ^TVkFilter;
  TVkFilter = (
    VK_FILTER_NEAREST = 0,
    VK_FILTER_LINEAR = 1,
    VK_FILTER_CUBIC_IMG = 1000015000,
    VK_FILTER_BEGIN_RANGE = VK_FILTER_NEAREST,
    VK_FILTER_END_RANGE = VK_FILTER_LINEAR,
    VK_FILTER_RANGE_SIZE = (VK_FILTER_LINEAR - VK_FILTER_NEAREST + 1),
    VK_FILTER_MAX_ENUM = $7FFFFFFF);

  PVkSamplerMipmapMode = ^TVkSamplerMipmapMode;
  TVkSamplerMipmapMode = (
    VK_SAMPLER_MIPMAP_MODE_NEAREST = 0,
    VK_SAMPLER_MIPMAP_MODE_LINEAR = 1,
    VK_SAMPLER_MIPMAP_MODE_BEGIN_RANGE = VK_SAMPLER_MIPMAP_MODE_NEAREST,
    VK_SAMPLER_MIPMAP_MODE_END_RANGE = VK_SAMPLER_MIPMAP_MODE_LINEAR,
    VK_SAMPLER_MIPMAP_MODE_RANGE_SIZE = (VK_SAMPLER_MIPMAP_MODE_LINEAR - VK_SAMPLER_MIPMAP_MODE_NEAREST + 1),
    VK_SAMPLER_MIPMAP_MODE_MAX_ENUM = $7FFFFFFF);

  PVkSamplerAddressMode = ^TVkSamplerAddressMode;
  TVkSamplerAddressMode = (
    VK_SAMPLER_ADDRESS_MODE_REPEAT = 0,
    VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 1,
    VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 2,
    VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 3,
    VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 4,
    VK_SAMPLER_ADDRESS_MODE_BEGIN_RANGE = VK_SAMPLER_ADDRESS_MODE_REPEAT,
    VK_SAMPLER_ADDRESS_MODE_END_RANGE = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER,
    VK_SAMPLER_ADDRESS_MODE_RANGE_SIZE = (VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER - VK_SAMPLER_ADDRESS_MODE_REPEAT + 1),
    VK_SAMPLER_ADDRESS_MODE_MAX_ENUM = $7FFFFFFF);

  PVkBorderColor = ^TVkBorderColor;
  TVkBorderColor = (
    VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0,
    VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 1,
    VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 2,
    VK_BORDER_COLOR_INT_OPAQUE_BLACK = 3,
    VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 4,
    VK_BORDER_COLOR_INT_OPAQUE_WHITE = 5,
    VK_BORDER_COLOR_BEGIN_RANGE = VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK,
    VK_BORDER_COLOR_END_RANGE = VK_BORDER_COLOR_INT_OPAQUE_WHITE,
    VK_BORDER_COLOR_RANGE_SIZE = (VK_BORDER_COLOR_INT_OPAQUE_WHITE - VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK + 1),
    VK_BORDER_COLOR_MAX_ENUM = $7FFFFFFF);

  PVkDescriptorType = ^TVkDescriptorType;
  TVkDescriptorType = (
    VK_DESCRIPTOR_TYPE_SAMPLER = 0,
    VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 1,
    VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 2,
    VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 3,
    VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 4,
    VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 5,
    VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 6,
    VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 7,
    VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 8,
    VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 9,
    VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 10,
    VK_DESCRIPTOR_TYPE_BEGIN_RANGE = VK_DESCRIPTOR_TYPE_SAMPLER,
    VK_DESCRIPTOR_TYPE_END_RANGE = VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT,
    VK_DESCRIPTOR_TYPE_RANGE_SIZE = (VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT - VK_DESCRIPTOR_TYPE_SAMPLER + 1),
    VK_DESCRIPTOR_TYPE_MAX_ENUM = $7FFFFFFF);

  PVkAttachmentLoadOp = ^TVkAttachmentLoadOp;
  TVkAttachmentLoadOp = (
    VK_ATTACHMENT_LOAD_OP_LOAD = 0,
    VK_ATTACHMENT_LOAD_OP_CLEAR = 1,
    VK_ATTACHMENT_LOAD_OP_DONT_CARE = 2,
    VK_ATTACHMENT_LOAD_OP_BEGIN_RANGE = VK_ATTACHMENT_LOAD_OP_LOAD,
    VK_ATTACHMENT_LOAD_OP_END_RANGE = VK_ATTACHMENT_LOAD_OP_DONT_CARE,
    VK_ATTACHMENT_LOAD_OP_RANGE_SIZE = (VK_ATTACHMENT_LOAD_OP_DONT_CARE - VK_ATTACHMENT_LOAD_OP_LOAD + 1),
    VK_ATTACHMENT_LOAD_OP_MAX_ENUM = $7FFFFFFF);

  PVkAttachmentStoreOp = ^TVkAttachmentStoreOp;
  TVkAttachmentStoreOp = (
    VK_ATTACHMENT_STORE_OP_STORE = 0,
    VK_ATTACHMENT_STORE_OP_DONT_CARE = 1,
    VK_ATTACHMENT_STORE_OP_BEGIN_RANGE = VK_ATTACHMENT_STORE_OP_STORE,
    VK_ATTACHMENT_STORE_OP_END_RANGE = VK_ATTACHMENT_STORE_OP_DONT_CARE,
    VK_ATTACHMENT_STORE_OP_RANGE_SIZE = (VK_ATTACHMENT_STORE_OP_DONT_CARE - VK_ATTACHMENT_STORE_OP_STORE + 1),
    VK_ATTACHMENT_STORE_OP_MAX_ENUM = $7FFFFFFF);

  PVkPipelineBindPoint = ^TVkPipelineBindPoint;
  TVkPipelineBindPoint = (
    VK_PIPELINE_BIND_POINT_GRAPHICS = 0,
    VK_PIPELINE_BIND_POINT_COMPUTE = 1,
    VK_PIPELINE_BIND_POINT_BEGIN_RANGE = VK_PIPELINE_BIND_POINT_GRAPHICS,
    VK_PIPELINE_BIND_POINT_END_RANGE = VK_PIPELINE_BIND_POINT_COMPUTE,
    VK_PIPELINE_BIND_POINT_RANGE_SIZE = (VK_PIPELINE_BIND_POINT_COMPUTE - VK_PIPELINE_BIND_POINT_GRAPHICS + 1),
    VK_PIPELINE_BIND_POINT_MAX_ENUM = $7FFFFFFF);

  PVkCommandBufferLevel = ^TVkCommandBufferLevel;
  TVkCommandBufferLevel = (
    VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0,
    VK_COMMAND_BUFFER_LEVEL_SECONDARY = 1,
    VK_COMMAND_BUFFER_LEVEL_BEGIN_RANGE = VK_COMMAND_BUFFER_LEVEL_PRIMARY,
    VK_COMMAND_BUFFER_LEVEL_END_RANGE = VK_COMMAND_BUFFER_LEVEL_SECONDARY,
    VK_COMMAND_BUFFER_LEVEL_RANGE_SIZE = (VK_COMMAND_BUFFER_LEVEL_SECONDARY - VK_COMMAND_BUFFER_LEVEL_PRIMARY + 1),
    VK_COMMAND_BUFFER_LEVEL_MAX_ENUM = $7FFFFFFF);

  PVkIndexType = ^TVkIndexType;
  TVkIndexType = (
    VK_INDEX_TYPE_UINT16 = 0,
    VK_INDEX_TYPE_UINT32 = 1,
    VK_INDEX_TYPE_BEGIN_RANGE = VK_INDEX_TYPE_UINT16,
    VK_INDEX_TYPE_END_RANGE = VK_INDEX_TYPE_UINT32,
    VK_INDEX_TYPE_RANGE_SIZE = (VK_INDEX_TYPE_UINT32 - VK_INDEX_TYPE_UINT16 + 1),
    VK_INDEX_TYPE_MAX_ENUM = $7FFFFFFF);

  PVkSubpassContents = ^TVkSubpassContents;
  TVkSubpassContents = (
    VK_SUBPASS_CONTENTS_INLINE = 0,
    VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 1,
    VK_SUBPASS_CONTENTS_BEGIN_RANGE = VK_SUBPASS_CONTENTS_INLINE,
    VK_SUBPASS_CONTENTS_END_RANGE = VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS,
    VK_SUBPASS_CONTENTS_RANGE_SIZE = (VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS - VK_SUBPASS_CONTENTS_INLINE + 1),
    VK_SUBPASS_CONTENTS_MAX_ENUM = $7FFFFFFF);

 
  PVkInstanceCreateFlags = ^TVkInstanceCreateFlags;
  TVkInstanceCreateFlags = TVkFlags;

  PVkFormatFeatureFlagBits = ^TVkFormatFeatureFlagBits;
  TVkFormatFeatureFlagBits = (
    VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = $00000001,
    VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = $00000002,
    VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = $00000004,
    VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = $00000008,
    VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = $00000010,
    VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = $00000020,
    VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = $00000040,
    VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = $00000080,
    VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = $00000100,
    VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = $00000200,
    VK_FORMAT_FEATURE_BLIT_SRC_BIT = $00000400,
    VK_FORMAT_FEATURE_BLIT_DST_BIT = $00000800,
    VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = $00001000,
    VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = $00002000,
	VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = $00004000,
	VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = $00008000,
    VK_FORMAT_FEATURE_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);


  PVkFormatFeatureFlags = ^TVkFormatFeatureFlags;
  TVkFormatFeatureFlags = TVkFlags;

  PVkImageUsageFlagBits = ^TVkImageUsageFlagBits;
  TVkImageUsageFlagBits = (
    VK_IMAGE_USAGE_TRANSFER_SRC_BIT = $00000001,
    VK_IMAGE_USAGE_TRANSFER_DST_BIT = $00000002,
    VK_IMAGE_USAGE_SAMPLED_BIT = $00000004,
    VK_IMAGE_USAGE_STORAGE_BIT = $00000008,
    VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = $00000010,
    VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = $00000020,
    VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = $00000040,
    VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = $00000080,
    VK_IMAGE_USAGE_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);

  PVkImageUsageFlags = ^TVkImageUsageFlags;
  TVkImageUsageFlags = TVkFlags;

  PVkImageCreateFlagBits = ^TVkImageCreateFlagBits;
  TVkImageCreateFlagBits = (
    VK_IMAGE_CREATE_SPARSE_BINDING_BIT = $00000001,
    VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = $00000002,
    VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = $00000004,
    VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = $00000008,
    VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = $00000010,
    VK_IMAGE_CREATE_BIND_SFR_BIT_KHX = $00000040,
    VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = $00000020,
    VK_IMAGE_CREATE_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);

  PVkImageCreateFlags = ^TVkImageCreateFlags;
  TVkImageCreateFlags = TVkFlags;

  PVkSampleCountFlagBits = ^TVkSampleCountFlagBits;
  TVkSampleCountFlagBits  = (
    VK_SAMPLE_COUNT_1_BIT = $00000001,
    VK_SAMPLE_COUNT_2_BIT = $00000002,
    VK_SAMPLE_COUNT_4_BIT = $00000004,
    VK_SAMPLE_COUNT_8_BIT = $00000008,
    VK_SAMPLE_COUNT_16_BIT = $00000010,
    VK_SAMPLE_COUNT_32_BIT = $00000020,
    VK_SAMPLE_COUNT_64_BIT = $00000040,
    VK_SAMPLE_COUNT_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);

  PVkSampleCountFlags = ^TVkSampleCountFlags;
  TVkSampleCountFlags = TVkFlags;

  PVkQueueFlagBits = ^TVkQueueFlagBits;
  TVkQueueFlagBits = (
    VK_QUEUE_GRAPHICS_BIT = $00000001,
    VK_QUEUE_COMPUTE_BIT = $00000002,
    VK_QUEUE_TRANSFER_BIT = $00000004,
    VK_QUEUE_SPARSE_BINDING_BIT = $00000008,
    VK_QUEUE_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);

  PVkQueueFlags = ^TVkQueueFlags;
  TVkQueueFlags = TVkFlags;

  PVkMemoryPropertyFlagBits = ^TVkMemoryPropertyFlagBits;
  TVkMemoryPropertyFlagBits = (
    VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = $00000001,
    VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = $00000002,
    VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = $00000004,
    VK_MEMORY_PROPERTY_HOST_CACHED_BIT = $00000008,
    VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = $00000010,
    VK_MEMORY_PROPERTY_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);

  PVkMemoryPropertyFlags = ^TVkMemoryPropertyFlags;
  TVkMemoryPropertyFlags = TVkFlags;

 PVkMemoryHeapFlagBits = ^TVkMemoryHeapFlagBits;
 TVkMemoryHeapFlagBits = (
    VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = $00000001,
    VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHX = $00000002,
    VK_MEMORY_HEAP_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);

  PVkMemoryHeapFlags = ^TVkMemoryHeapFlags;
  TVkMemoryHeapFlags = TVkFlags;

  PVkDeviceCreateFlags = ^TVkDeviceCreateFlags;
  TVkDeviceCreateFlags = TVkFlags;

  PVkDeviceQueueCreateFlags = ^TVkDeviceQueueCreateFlags;
  TVkDeviceQueueCreateFlags = TVkFlags;

  PVkPipelineStageFlagBits = ^TVkPipelineStageFlagBits;
  TVkPipelineStageFlagBits = (
    VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = $00000001,
    VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = $00000002,
    VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = $00000004,
    VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = $00000008,
    VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = $00000010,
    VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = $00000020,
    VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = $00000040,
    VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = $00000080,
    VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = $00000100,
    VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = $00000200,
    VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = $00000400,
    VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = $00000800,
    VK_PIPELINE_STAGE_TRANSFER_BIT = $00001000,
    VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = $00002000,
    VK_PIPELINE_STAGE_HOST_BIT = $00004000,
    VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = $00008000,
    VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = $00010000,
    VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = $00020000,
    VK_PIPELINE_STAGE_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);

  PVkPipelineStageFlags = ^TVkPipelineStageFlags;
  TVkPipelineStageFlags = TVkFlags;

  PVkMemoryMapFlags = ^TVkMemoryMapFlags;
  TVkMemoryMapFlags = TVkFlags;

  PVkImageAspectFlagBits = ^TVkImageAspectFlagBits;
  TVkImageAspectFlagBits = (
    VK_IMAGE_ASPECT_COLOR_BIT = $00000001,
    VK_IMAGE_ASPECT_DEPTH_BIT = $00000002,
    VK_IMAGE_ASPECT_STENCIL_BIT = $00000004,
    VK_IMAGE_ASPECT_METADATA_BIT = $00000008,
    VK_IMAGE_ASPECT_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);

  PVkImageAspectFlags = ^TVkImageAspectFlags;
  TVkImageAspectFlags = TVkFlags;

  PVkSparseImageFormatFlagBits = ^TVkSparseImageFormatFlagBits;
  TVkSparseImageFormatFlagBits = (
    VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = $00000001,
    VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT = $00000002,
    VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = $00000004,
    VK_SPARSE_IMAGE_FORMAT_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);

  PVkSparseImageFormatFlags = ^TVkSparseImageFormatFlags;
  TVkSparseImageFormatFlags = TVkFlags;

  PVkSparseMemoryBindFlagBits = ^TVkSparseMemoryBindFlagBits;
  TVkSparseMemoryBindFlagBits = (
    VK_SPARSE_MEMORY_BIND_METADATA_BIT = $00000001,
    VK_SPARSE_MEMORY_BIND_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);

  PVkSparseMemoryBindFlags = ^TVkSparseMemoryBindFlags;
  TVkSparseMemoryBindFlags = TVkFlags;

  PVkFenceCreateFlagBits = ^TVkFenceCreateFlagBits;
  TVkFenceCreateFlagBits = (
    VK_FENCE_CREATE_SIGNALED_BIT = $00000001,
    VK_FENCE_CREATE_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);

  PVkFenceCreateFlags = ^TVkFenceCreateFlags;
  TVkFenceCreateFlags = TVkFlags;

  PVkSemaphoreCreateFlags = ^TVkSemaphoreCreateFlags;
  TVkSemaphoreCreateFlags = TVkFlags;

  PVkEventCreateFlags = ^TVkEventCreateFlags;
  TVkEventCreateFlags = TVkFlags;

  PVkQueryPoolCreateFlags = ^TVkQueryPoolCreateFlags;
  TVkQueryPoolCreateFlags = TVkFlags;

  PVkQueryPipelineStatisticFlagBits = ^TVkQueryPipelineStatisticFlagBits;
  TVkQueryPipelineStatisticFlagBits = (
    VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = $00000001,
    VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = $00000002,
    VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = $00000004,
    VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = $00000008,
    VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = $00000010,
    VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = $00000020,
    VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = $00000040,
    VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = $00000080,
    VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = $00000100,
    VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = $00000200,
    VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = $00000400,
    VK_QUERY_PIPELINE_STATISTIC_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);

  PVkQueryPipelineStatisticFlags = ^TVkQueryPipelineStatisticFlags;
  TVkQueryPipelineStatisticFlags = TVkFlags;

  PVkQueryResultFlagBits = ^TVkQueryResultFlagBits;
  TVkQueryResultFlagBits = (
    VK_QUERY_RESULT_64_BIT = $00000001,
    VK_QUERY_RESULT_WAIT_BIT = $00000002,
    VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = $00000004,
    VK_QUERY_RESULT_PARTIAL_BIT = $00000008,
    VK_QUERY_RESULT_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);

  PVkQueryResultFlags = ^TVkQueryResultFlags;
  TVkQueryResultFlags = TVkFlags;

  PVkBufferCreateFlagBits = ^TVkBufferCreateFlagBits;
  TVkBufferCreateFlagBits = (
    VK_BUFFER_CREATE_SPARSE_BINDING_BIT = $00000001,
    VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = $00000002,
    VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = $00000004,
    VK_BUFFER_CREATE_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);

  PVkBufferCreateFlags = ^TVkBufferCreateFlags;
  TVkBufferCreateFlags = TVkFlags;

 PVkBufferUsageFlagBits = ^TVkBufferUsageFlagBits;
 TVkBufferUsageFlagBits = (
    VK_BUFFER_USAGE_TRANSFER_SRC_BIT = $00000001,
    VK_BUFFER_USAGE_TRANSFER_DST_BIT = $00000002,
    VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = $00000004,
    VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = $00000008,
    VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = $00000010,
    VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = $00000020,
    VK_BUFFER_USAGE_INDEX_BUFFER_BIT = $00000040,
    VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = $00000080,
    VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = $00000100,
    VK_BUFFER_USAGE_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);

  PVkBufferUsageFlags = ^TVkBufferUsageFlags;
  TVkBufferUsageFlags = TVkFlags;

  PVkBufferViewCreateFlags = ^TVkBufferViewCreateFlags;
  TVkBufferViewCreateFlags = TVkFlags;

  PVkImageViewCreateFlags = ^TVkImageViewCreateFlags;
  TVkImageViewCreateFlags = TVkFlags;

  PVkShaderModuleCreateFlags = ^TVkShaderModuleCreateFlags;
  TVkShaderModuleCreateFlags = TVkFlags;

  PVkPipelineCacheCreateFlags = ^TVkPipelineCacheCreateFlags;
  TVkPipelineCacheCreateFlags = TVkFlags;

  PVkPipelineCreateFlagBits = ^TVkPipelineCreateFlagBits;
  TVkPipelineCreateFlagBits = (
    VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = $00000001,
    VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = $00000002,
    VK_PIPELINE_CREATE_DERIVATIVE_BIT = $00000004,
    VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHX = $00000008,
    VK_PIPELINE_CREATE_DISPATCH_BASE_KHX = $00000010,
    VK_PIPELINE_CREATE_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);

 
  PVkPipelineCreateFlags = ^TVkPipelineCreateFlags; 
  TVkPipelineCreateFlags = TVkFlags;

  PVkPipelineShaderStageCreateFlags = ^TVkPipelineShaderStageCreateFlags;
  TVkPipelineShaderStageCreateFlags = TVkFlags;

  PVkShaderStageFlagBits = ^TVkShaderStageFlagBits;
  TVkShaderStageFlagBits = (
    VK_SHADER_STAGE_VERTEX_BIT = $00000001,
    VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = $00000002,
    VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = $00000004,
    VK_SHADER_STAGE_GEOMETRY_BIT = $00000008,
    VK_SHADER_STAGE_FRAGMENT_BIT = $00000010,
    VK_SHADER_STAGE_COMPUTE_BIT = $00000020,
    VK_SHADER_STAGE_ALL_GRAPHICS = $0000001F,
    VK_SHADER_STAGE_ALL = $7FFFFFFF,
    VK_SHADER_STAGE_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);

 
  PVkPipelineVertexInputStateCreateFlags = ^TVkPipelineVertexInputStateCreateFlags;
  TVkPipelineVertexInputStateCreateFlags = TVkFlags;

  PVkPipelineInputAssemblyStateCreateFlags = ^TVkPipelineInputAssemblyStateCreateFlags;
  TVkPipelineInputAssemblyStateCreateFlags = TVkFlags;

  PVkPipelineTessellationStateCreateFlags = ^TVkPipelineTessellationStateCreateFlags;
  TVkPipelineTessellationStateCreateFlags = TVkFlags;

  PVkPipelineViewportStateCreateFlags = ^TVkPipelineViewportStateCreateFlags;
  TVkPipelineViewportStateCreateFlags = TVkFlags;

  PVkPipelineRasterizationStateCreateFlags = ^TVkPipelineRasterizationStateCreateFlags;
  TVkPipelineRasterizationStateCreateFlags = TVkFlags;

  PVkCullModeFlagBits = ^TVkCullModeFlagBits;
  TVkCullModeFlagBits = (
    VK_CULL_MODE_NONE = 0,
    VK_CULL_MODE_FRONT_BIT = $00000001,
    VK_CULL_MODE_BACK_BIT = $00000002,
    VK_CULL_MODE_FRONT_AND_BACK = $00000003,
    VK_CULL_MODE_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);

 
  PVkCullModeFlags = ^TVkCullModeFlags; 
  TVkCullModeFlags = TVkFlags;

  PVkPipelineMultisampleStateCreateFlags = ^TVkPipelineMultisampleStateCreateFlags;
  TVkPipelineMultisampleStateCreateFlags = TVkFlags;

  PVkPipelineDepthStencilStateCreateFlags = ^TVkPipelineDepthStencilStateCreateFlags;
  TVkPipelineDepthStencilStateCreateFlags = TVkFlags;

  PVkPipelineColorBlendStateCreateFlags = ^TVkPipelineColorBlendStateCreateFlags;
  TVkPipelineColorBlendStateCreateFlags = TVkFlags;

  PVkColorComponentFlagBits = ^TVkColorComponentFlagBits;
  TVkColorComponentFlagBits = (
    VK_COLOR_COMPONENT_R_BIT = $00000001,
    VK_COLOR_COMPONENT_G_BIT = $00000002,
    VK_COLOR_COMPONENT_B_BIT = $00000004,
    VK_COLOR_COMPONENT_A_BIT = $00000008,
    VK_COLOR_COMPONENT_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);

  PVkColorComponentFlags = ^TVkColorComponentFlags; 
  TVkColorComponentFlags = TVkFlags;

  PVkPipelineDynamicStateCreateFlags = ^TVkPipelineDynamicStateCreateFlags;
  TVkPipelineDynamicStateCreateFlags = TVkFlags;

  PVkPipelineLayoutCreateFlags = ^TVkPipelineLayoutCreateFlags;
  TVkPipelineLayoutCreateFlags = TVkFlags;

  PVkShaderStageFlags = ^TVkShaderStageFlags;
  TVkShaderStageFlags = TVkFlags;

  PVkSamplerCreateFlags = ^TVkSamplerCreateFlags;
  TVkSamplerCreateFlags = TVkFlags;

  PVkDescriptorSetLayoutCreateFlags = ^TVkDescriptorSetLayoutCreateFlags;
  TVkDescriptorSetLayoutCreateFlags = TVkFlags;

  PVkDescriptorPoolCreateFlagBits = ^TVkDescriptorPoolCreateFlagBits;
  TVkDescriptorPoolCreateFlagBits = (
    VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = $00000001,
    VK_DESCRIPTOR_POOL_CREATE_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);


  PVkDescriptorPoolCreateFlags = ^TVkDescriptorPoolCreateFlags; 
  TVkDescriptorPoolCreateFlags = TVkFlags;

  PVkDescriptorPoolResetFlags = ^TVkDescriptorPoolResetFlags;
  TVkDescriptorPoolResetFlags = TVkFlags;

  PVkFramebufferCreateFlags = ^TVkFramebufferCreateFlags;
  TVkFramebufferCreateFlags = TVkFlags;

  PVkRenderPassCreateFlags = ^TVkRenderPassCreateFlags;
  TVkRenderPassCreateFlags = TVkFlags;


  PVkAttachmentDescriptionFlagBits = ^TVkAttachmentDescriptionFlagBits;
  TVkAttachmentDescriptionFlagBits = (
    VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = $00000001,
    VK_ATTACHMENT_DESCRIPTION_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);


  PVkAttachmentDescriptionFlags = ^TVkAttachmentDescriptionFlags; 
  TVkAttachmentDescriptionFlags = TVkFlags;

  PVkSubpassDescriptionFlagBits = ^TVkSubpassDescriptionFlagBits;
  TVkSubpassDescriptionFlagBits = (
    VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = $00000001,
    VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = $00000002,
    VK_SUBPASS_DESCRIPTION_FLAG_BITS_MAX_ENUM = $7FFFFFFF
    ); 

  PVkSubpassDescriptionFlags = ^TVkSubpassDescriptionFlags;
  TVkSubpassDescriptionFlags = TVkFlags ;

  PVkAccessFlagBits = ^TVkAccessFlagBits;
  TVkAccessFlagBits = (
    VK_ACCESS_INDIRECT_COMMAND_READ_BIT = $00000001,
    VK_ACCESS_INDEX_READ_BIT = $00000002,
    VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = $00000004,
    VK_ACCESS_UNIFORM_READ_BIT = $00000008,
    VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = $00000010,
    VK_ACCESS_SHADER_READ_BIT = $00000020,
    VK_ACCESS_SHADER_WRITE_BIT = $00000040,
    VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = $00000080,
    VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = $00000100,
    VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = $00000200,
    VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = $00000400,
    VK_ACCESS_TRANSFER_READ_BIT = $00000800,
    VK_ACCESS_TRANSFER_WRITE_BIT = $00001000,
    VK_ACCESS_HOST_READ_BIT = $00002000,
    VK_ACCESS_HOST_WRITE_BIT = $00004000,
    VK_ACCESS_MEMORY_READ_BIT = $00008000,
    VK_ACCESS_MEMORY_WRITE_BIT = $00010000,
    VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = $00020000,
    VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = $00040000,
    VK_ACCESS_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);

 
  PVkAccessFlags = ^TVkAccessFlags;
  TVkAccessFlags = TVkFlags;


  PVkDependencyFlagBits = ^TVkDependencyFlagBits;
  TVkDependencyFlagBits = (
    VK_DEPENDENCY_BY_REGION_BIT = $00000001,
    VK_DEPENDENCY_VIEW_LOCAL_BIT_KHX = $00000002,
    VK_DEPENDENCY_DEVICE_GROUP_BIT_KHX = $00000004,
    VK_DEPENDENCY_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);

 
  PVkDependencyFlags = ^TVkDependencyFlags; 
  TVkDependencyFlags = TVkFlags;

  PVkCommandPoolCreateFlagBits = ^TVkCommandPoolCreateFlagBits;
  TVkCommandPoolCreateFlagBits = (
    VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = $00000001,
    VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = $00000002,
    VK_COMMAND_POOL_CREATE_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);

 
  PVkCommandPoolCreateFlags = ^TVkCommandPoolCreateFlags; 
  TVkCommandPoolCreateFlags = TVkFlags;


  PVkCommandPoolResetFlagBits = ^TVkCommandPoolResetFlagBits;
  TVkCommandPoolResetFlagBits = (
    VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = $00000001,
    VK_COMMAND_POOL_RESET_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);
 
  PVkCommandPoolResetFlags = ^TVkCommandPoolResetFlags; 
  TVkCommandPoolResetFlags = TVkFlags;

  PVkCommandBufferUsageFlagBits = ^TVkCommandBufferUsageFlagBits;
  TVkCommandBufferUsageFlagBits = (
    VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = $00000001,
    VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = $00000002,
    VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = $00000004,
    VK_COMMAND_BUFFER_USAGE_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);

 
  PVkCommandBufferUsageFlags = ^TVkCommandBufferUsageFlags; 
  TVkCommandBufferUsageFlags = TVkFlags;


  PVkQueryControlFlagBits = ^TVkQueryControlFlagBits;
  TVkQueryControlFlagBits = (
    VK_QUERY_CONTROL_PRECISE_BIT = $00000001,
    VK_QUERY_CONTROL_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);

 
  PVkQueryControlFlags = ^TVkQueryControlFlags; 
  TVkQueryControlFlags = TVkFlags;


  PVkCommandBufferResetFlagBits = ^TVkCommandBufferResetFlagBits;
  TVkCommandBufferResetFlagBits = (
    VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = $00000001,
    VK_COMMAND_BUFFER_RESET_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);


  PVkCommandBufferResetFlags = ^TVkCommandBufferResetFlags;  
  TVkCommandBufferResetFlags = TVkFlags;

  PVkStencilFaceFlagBits = ^TVkStencilFaceFlagBits;
  TVkStencilFaceFlagBits = (
    VK_STENCIL_FACE_FRONT_BIT = $00000001,
    VK_STENCIL_FACE_BACK_BIT = $00000002,
    VK_STENCIL_FRONT_AND_BACK = $00000003,
    VK_STENCIL_FACE_FLAG_BITS_MAX_ENUM = $7FFFFFFF
	);
 
  PVkStencilFaceFlags = ^TVkStencilFaceFlags; 
  TVkStencilFaceFlags = TVkFlags;


TvkAllocationFunction = function(
   pUserData: Pointer;
   size: TVKsize;
   alignment: TVKsize;
   allocationScope: TVkSystemAllocationScope): Pointer;
    stdcall;

TvkReallocationFunction = function(
   pUserData: Pointer;
   pOriginal: Pointer;
   size: TVKsize;
   alignment: TVKsize;
   allocationScope: TVkSystemAllocationScope): Pointer;
    stdcall;

  TvkFreeFunction = procedure(
    pUserData: Pointer;
    pMemory: Pointer);
   stdcall;

TvkInternalAllocationNotification = procedure(
    pUserData: Pointer;
    size: TVKsize;
    allocationType: TVkInternalAllocationType;
    allocationScope: TVkSystemAllocationScope);
     stdcall;


TvkInternalFreeNotification = procedure(
    pUserData: Pointer;
    size: TVKsize;
    allocationType: TVkInternalAllocationType;
    allocationScope: TVkSystemAllocationScope);
     stdcall;

   TvkVoidFunction = procedure();
    stdcall;

type
  PVkApplicationInfo = ^TVkApplicationInfo;
  TVkApplicationInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    pApplicationName: PVkChar;
    applicationVersion: Uint32;
    pEngineName: PVkChar;
    engineVersion: Uint32;
    apiVersion: Uint32;
  end;

  PVkInstanceCreateInfo = ^TVkInstanceCreateInfo;
  TVkInstanceCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkInstanceCreateFlags;
    pApplicationInfo: PVkApplicationInfo;
    enabledLayerCount: Uint32;
    ppEnabledLayerNames: PPVkChar;
    enabledExtensionCount: Uint32;
    ppEnabledExtensionNames: PPVkChar
 end;

  PVkAllocationCallbacks = ^TVkAllocationCallbacks;
  TVkAllocationCallbacks = record
    pUserData: Pointer;
    pfnAllocation: TvkAllocationFunction;
    pfnReallocation: TvkReallocationFunction;
    pfnFree: TvkFreeFunction;
    pfnInternalAllocation: TvkInternalAllocationNotification;
    pfnInternalFree: TvkInternalFreeNotification;
  end;

  PVkPhysicalDeviceFeatures = ^TVkPhysicalDeviceFeatures;
  TVkPhysicalDeviceFeatures = record    robustBufferAccess: TVkBool32;
    fullDrawIndexUint32: TVkBool32;
    imageCubeArray: TVkBool32;
    independentBlend: TVkBool32;
    geometryShader: TVkBool32;
    tessellationShader: TVkBool32;
    sampleRateShading: TVkBool32;
    dualSrcBlend: TVkBool32;
    logicOp: TVkBool32;
    multiDrawIndirect: TVkBool32;
    drawIndirectFirstInstance: TVkBool32;
    depthClamp: TVkBool32;
    depthBiasClamp: TVkBool32;
    fillModeNonSolid: TVkBool32;
    depthBounds: TVkBool32;
    wideLines: TVkBool32;
    largePoints: TVkBool32;
    alphaToOne: TVkBool32;
    multiViewport: TVkBool32;
    samplerAnisotropy: TVkBool32;
    textureCompressionETC2: TVkBool32;
    textureCompressionASTC_LDR: TVkBool32;
    textureCompressionBC: TVkBool32;
    occlusionQueryPrecise: TVkBool32;
    pipelineStatisticsQuery: TVkBool32;
    vertexPipelineStoresAndAtomics: TVkBool32;
    fragmentStoresAndAtomics: TVkBool32;
    shaderTessellationAndGeometryPointSize: TVkBool32;
    shaderImageGatherExtended: TVkBool32;
    shaderStorageImageExtendedFormats: TVkBool32;
    shaderStorageImageMultisample: TVkBool32;
    shaderStorageImageReadWithoutFormat: TVkBool32;
    shaderStorageImageWriteWithoutFormat: TVkBool32;
    shaderUniformBufferArrayDynamicIndexing: TVkBool32;
    shaderSampledImageArrayDynamicIndexing: TVkBool32;
    shaderStorageBufferArrayDynamicIndexing: TVkBool32;
    shaderStorageImageArrayDynamicIndexing: TVkBool32;
    shaderClipDistance: TVkBool32;
    shaderCullDistance: TVkBool32;
    shaderFloat64: TVkBool32;
    shaderInt64: TVkBool32;
    shaderInt16: TVkBool32;
    shaderResourceResidency: TVkBool32;
    shaderResourceMinLod: TVkBool32;
    sparseBinding: TVkBool32;
    sparseResidencyBuffer: TVkBool32;
    sparseResidencyImage2D: TVkBool32;
    sparseResidencyImage3D: TVkBool32;
    sparseResidency2Samples: TVkBool32;
    sparseResidency4Samples: TVkBool32;
    sparseResidency8Samples: TVkBool32;
    sparseResidency16Samples: TVkBool32;
    sparseResidencyAliased: TVkBool32;
    variableMultisampleRate: TVkBool32;
    inheritedQueries: TVkBool32;
  end;

  PVkFormatProperties = ^TVkFormatProperties;  TVkFormatProperties = record
    linearTilingFeatures: TVkFormatFeatureFlags;
    optimalTilingFeatures: TVkFormatFeatureFlags;
    bufferFeatures: TVkFormatFeatureFlags;
  end;

  PVkExtent3D = ^TVkExtent3D;
  TVkExtent3D = record
    width: Uint32;
    height: Uint32;
    depth: Uint32;
  end;

  PVkImageFormatProperties = ^TVkImageFormatProperties;  TVkImageFormatProperties = record
    maxExtent: TVkExtent3D;
    maxMipLevels: Uint32;
    maxArrayLayers: Uint32;
    sampleCounts: TVkSampleCountFlags;
    maxResourceSize: TVkDeviceSize;
  end;

  PVkPhysicalDeviceLimits = ^TVkPhysicalDeviceLimits;
  TVkPhysicalDeviceLimits = record
    maxImageDimension1D: Uint32;
    maxImageDimension2D: Uint32;
    maxImageDimension3D: Uint32;
    maxImageDimensionCube: Uint32;
    maxImageArrayLayers: Uint32;
    maxTexelBufferElements: Uint32;
    maxUniformBufferRange: Uint32;
    maxStorageBufferRange: Uint32;
    maxPushConstantsSize: Uint32;
    maxMemoryAllocationCount: Uint32;
    maxSamplerAllocationCount: Uint32;
    bufferImageGranularity: TVkDeviceSize;
    sparseAddressSpaceSize: TVkDeviceSize;
    maxBoundDescriptorSets: Uint32;
    maxPerStageDescriptorSamplers: Uint32;
    maxPerStageDescriptorUniformBuffers: Uint32;
    maxPerStageDescriptorStorageBuffers: Uint32;
    maxPerStageDescriptorSampledImages: Uint32;
    maxPerStageDescriptorStorageImages: Uint32;
    maxPerStageDescriptorInputAttachments: Uint32;
    maxPerStageResources: Uint32;
    maxDescriptorSetSamplers: Uint32;
    maxDescriptorSetUniformBuffers: Uint32;
    maxDescriptorSetUniformBuffersDynamic: Uint32;
    maxDescriptorSetStorageBuffers: Uint32;
    maxDescriptorSetStorageBuffersDynamic: Uint32;
    maxDescriptorSetSampledImages: Uint32;
    maxDescriptorSetStorageImages: Uint32;
    maxDescriptorSetInputAttachments: Uint32;
    maxVertexInputAttributes: Uint32;
    maxVertexInputBindings: Uint32;
    maxVertexInputAttributeOffset: Uint32;
    maxVertexInputBindingStride: Uint32;
    maxVertexOutputComponents: Uint32;
    maxTessellationGenerationLevel: Uint32;
    maxTessellationPatchSize: Uint32;
    maxTessellationControlPerVertexInputComponents: Uint32;
    maxTessellationControlPerVertexOutputComponents: Uint32;
    maxTessellationControlPerPatchOutputComponents: Uint32;
    maxTessellationControlTotalOutputComponents: Uint32;
    maxTessellationEvaluationInputComponents: Uint32;
    maxTessellationEvaluationOutputComponents: Uint32;
    maxGeometryShaderInvocations: Uint32;
    maxGeometryInputComponents: Uint32;
    maxGeometryOutputComponents: Uint32;
    maxGeometryOutputVertices: Uint32;
    maxGeometryTotalOutputComponents: Uint32;
    maxFragmentInputComponents: Uint32;
    maxFragmentOutputAttachments: Uint32;
    maxFragmentDualSrcAttachments: Uint32;
    maxFragmentCombinedOutputResources: Uint32;
    maxComputeSharedMemorySize: Uint32;
    maxComputeWorkGroupCount: Array [0..2] of Uint32;
    maxComputeWorkGroupInvocations: Uint32;
    maxComputeWorkGroupSize: Array [0..2] of Uint32;
    subPixelPrecisionBits: Uint32;
    subTexelPrecisionBits: Uint32;
    mipmapPrecisionBits: Uint32;
    maxDrawIndexedIndexValue: Uint32;
    maxDrawIndirectCount: Uint32;
    maxSamplerLodBias: Single;
    maxSamplerAnisotropy: Single;
    maxViewports: Uint32;
    maxViewportDimensions: Array [0..1] of Uint32;
    viewportBoundsRange: Array [0..1] of Single;
    viewportSubPixelBits: Uint32;
    minMemoryMapAlignment: TVKsize;
    minTexelBufferOffsetAlignment: TVkDeviceSize;
    minUniformBufferOffsetAlignment: TVkDeviceSize;
    minStorageBufferOffsetAlignment: TVkDeviceSize;
    minTexelOffset: TVKInt32;
    maxTexelOffset: Uint32;
    minTexelGatherOffset: TVKInt32;
    maxTexelGatherOffset: Uint32;
    minInterpolationOffset: Single;
    maxInterpolationOffset: Single;
    subPixelInterpolationOffsetBits: Uint32;
    maxFramebufferWidth: Uint32;
    maxFramebufferHeight: Uint32;
    maxFramebufferLayers: Uint32;
    framebufferColorSampleCounts: TVkSampleCountFlags;
    framebufferDepthSampleCounts: TVkSampleCountFlags;
    framebufferStencilSampleCounts: TVkSampleCountFlags;
    framebufferNoAttachmentsSampleCounts: TVkSampleCountFlags;
    maxColorAttachments: Uint32;
    sampledImageColorSampleCounts: TVkSampleCountFlags;
    sampledImageIntegerSampleCounts: TVkSampleCountFlags;
    sampledImageDepthSampleCounts: TVkSampleCountFlags;
    sampledImageStencilSampleCounts: TVkSampleCountFlags;
    storageImageSampleCounts: TVkSampleCountFlags;
    maxSampleMaskWords: Uint32;
    timestampComputeAndGraphics: TVkBool32;
    timestampPeriod: Single;
    maxClipDistances: Uint32;
    maxCullDistances: Uint32;
    maxCombinedClipAndCullDistances: Uint32;
    discreteQueuePriorities: Uint32;
    pointSizeRange: Array [0..1] of Single;
    lineWidthRange: Array [0..1] of Single;
    pointSizeGranularity: Single;
    lineWidthGranularity: Single;
    strictLines: TVkBool32;
    standardSampleLocations: TVkBool32;
    optimalBufferCopyOffsetAlignment: TVkDeviceSize;
    optimalBufferCopyRowPitchAlignment: TVkDeviceSize;
    nonCoherentAtomSize: TVkDeviceSize;
end;

  PVkPhysicalDeviceSparseProperties = ^TVkPhysicalDeviceSparseProperties;  TVkPhysicalDeviceSparseProperties = record
    residencyStandard2DBlockShape: TVkBool32;
    residencyStandard2DMultisampleBlockShape: TVkBool32;
    residencyStandard3DBlockShape: TVkBool32;
    residencyAlignedMipSize: TVkBool32;
    residencyNonResidentStrict: TVkBool32;
  end;

  PVkPhysicalDeviceProperties = ^TVkPhysicalDeviceProperties;
  TVkPhysicalDeviceProperties = record
    apiVersion: Uint32;
    driverVersion: Uint32;
    vendorID: Uint32;
    deviceID: Uint32;
    deviceType: TVkPhysicalDeviceType;
    deviceName: Array [0..VK_MAX_PHYSICAL_DEVICE_NAME_SIZE-1] of AnsiChar;
    pipelineCacheUUID: Array [0..VK_UUID_SIZE-1]of Uint8;
    limits: TVkPhysicalDeviceLimits;
    sparseProperties: TVkPhysicalDeviceSparseProperties;
  end;

  PVkQueueFamilyProperties = ^TVkQueueFamilyProperties;
  TVkQueueFamilyProperties = record
    queueFlags: TVkQueueFlags;
    queueCount: Uint32;
    timestampValidBits: Uint32;
    minImageTransferGranularity: TVkExtent3D;
  end;

  PVkMemoryType = ^TVkMemoryType;
  TVkMemoryType = record
    propertyFlags: TVkMemoryPropertyFlags;
    heapIndex: Uint32;
  end;

  PVkMemoryHeap = ^TVkMemoryHeap;
  TVkMemoryHeap = record
    size: TVkDeviceSize;
    flags: TVkMemoryHeapFlags;
  end;

  PVkPhysicalDeviceMemoryProperties = ^TVkPhysicalDeviceMemoryProperties;
  TVkPhysicalDeviceMemoryProperties = record
    memoryTypeCount: Uint32;
    memoryTypes: Array [0..VK_MAX_MEMORY_TYPES-1] of TVkMemoryType;
    memoryHeapCount: Uint32;
    memoryHeaps: Array [0..VK_MAX_MEMORY_HEAPS-1] of TVkMemoryHeap;
  end;

  PVkDeviceQueueCreateInfo = ^TVkDeviceQueueCreateInfo;
  TVkDeviceQueueCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkDeviceQueueCreateFlags;
    queueFamilyIndex: Uint32;
    queueCount: Uint32;
    pQueuePriorities: PSingle;
  end;

  PVkDeviceCreateInfo = ^TVkDeviceCreateInfo;
  TVkDeviceCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkDeviceCreateFlags;
    queueCreateInfoCount: Uint32;
    pQueueCreateInfos: PVkDeviceQueueCreateInfo;
    enabledLayerCount: Uint32;
    ppEnabledLayerNames: PPVkChar;
    enabledExtensionCount: Uint32;
    ppEnabledExtensionNames: PPVkChar;
    pEnabledFeatures: PVkPhysicalDeviceFeatures;
  end;

  PVkExtensionProperties = ^TVkExtensionProperties;
  TVkExtensionProperties = record
    extensionName: Array [0..VK_MAX_EXTENSION_NAME_SIZE-1] of AnsiChar;
    specVersion: Uint32;
  end;

  PVkLayerProperties = ^TVkLayerProperties;
  TVkLayerProperties = record
    layerName: Array [0..VK_MAX_EXTENSION_NAME_SIZE-1] of AnsiChar;
    specVersion: Uint32;
    implementationVersion: Uint32;
    description: Array [0..VK_MAX_DESCRIPTION_SIZE-1] of AnsiChar;
  end;

  PVkSubmitInfo = ^TVkSubmitInfo;
  TVkSubmitInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    waitSemaphoreCount: Uint32;
    pWaitSemaphores: PVkSemaphore;
    pWaitDstStageMask: PVkPipelineStageFlags;
    commandBufferCount: Uint32;
    pCommandBuffers: PVkCommandBuffer;
    signalSemaphoreCount: Uint32;
    pSignalSemaphores: PVkSemaphore;
  end;

  PVkMemoryAllocateInfo = ^TVkMemoryAllocateInfo;
  TVkMemoryAllocateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    allocationSize: TVkDeviceSize;
    memoryTypeIndex: Uint32;
  end;

  PVkMappedMemoryRange = ^TVkMappedMemoryRange;
  TVkMappedMemoryRange = record
    sType: TVkStructureType;
    pNext: Pointer;
    memory: TVkDeviceMemory;
    offset: TVkDeviceSize;
    size: TVkDeviceSize;
  end;

  PVkMemoryRequirements = ^TVkMemoryRequirements;
  TVkMemoryRequirements = record
    size: TVkDeviceSize;
    alignment: TVkDeviceSize;
    memoryTypeBits: Uint32;
  end;

  PVkSparseImageFormatProperties = ^TVkSparseImageFormatProperties;
  TVkSparseImageFormatProperties = record
    aspectMask: TVkImageAspectFlags;
    imageGranularity: TVkExtent3D;
    flags: TVkSparseImageFormatFlags;
  end;

  PVkSparseImageMemoryRequirements = ^TVkSparseImageMemoryRequirements;
  TVkSparseImageMemoryRequirements = record
    formatProperties: TVkSparseImageFormatProperties;
    imageMipTailFirstLod: Uint32;
    imageMipTailSize: TVkDeviceSize;
    imageMipTailOffset: TVkDeviceSize;
    imageMipTailStride: TVkDeviceSize;
  end;

  PVkSparseMemoryBind = ^TVkSparseMemoryBind;
  TVkSparseMemoryBind = record
    resourceOffset: TVkDeviceSize;
    size: TVkDeviceSize;
    memory: TVkDeviceMemory;
    memoryOffset: TVkDeviceSize;
    flags: TVkSparseMemoryBindFlags;
  end;

  PVkSparseBufferMemoryBindInfo = ^TVkSparseBufferMemoryBindInfo;
  TVkSparseBufferMemoryBindInfo = record
    buffer: TVkBuffer;
    bindCount: Uint32;
    pBinds: PVkSparseMemoryBind;
  end;

  PVkSparseImageOpaqueMemoryBindInfo = ^TVkSparseImageOpaqueMemoryBindInfo;
  TVkSparseImageOpaqueMemoryBindInfo = record
    image: TVkImage;
    bindCount: Uint32;
    pBinds: PVkSparseMemoryBind;
  end;

  PVkImageSubresource = ^TVkImageSubresource;
  TVkImageSubresource = record
    aspectMask: TVkImageAspectFlags;
    mipLevel: Uint32;
    arrayLayer: Uint32;
  end;

  PVkOffset3D = ^TVkOffset3D;
  TVkOffset3D = record
    x: TVKInt32;
    y: TVKInt32;
    z: TVKInt32;
  end;

  PVkSparseImageMemoryBind = ^TVkSparseImageMemoryBind;
  TVkSparseImageMemoryBind = record
    subresource: TVkImageSubresource;
    offset: TVkOffset3D;
    extent: TVkExtent3D;
    memory: TVkDeviceMemory;
    memoryOffset: TVkDeviceSize;
    flags: TVkSparseMemoryBindFlags;
  end;

  PVkSparseImageMemoryBindInfo = ^TVkSparseImageMemoryBindInfo;
  TVkSparseImageMemoryBindInfo = record
    image: TVkImage;
    bindCount: Uint32;
    pBinds: PVkSparseImageMemoryBind;
  end;

  PVkBindSparseInfo = ^TVkBindSparseInfo;
  TVkBindSparseInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    waitSemaphoreCount: Uint32;
    pWaitSemaphores: PVkSemaphore;
    bufferBindCount: Uint32;
    pBufferBinds: PVkSparseBufferMemoryBindInfo;
    imageOpaqueBindCount: Uint32;
    pImageOpaqueBinds: PVkSparseImageOpaqueMemoryBindInfo;
    imageBindCount: Uint32;
    pImageBinds: PVkSparseImageMemoryBindInfo;
    signalSemaphoreCount: Uint32;
    pSignalSemaphores: PVkSemaphore;
  end;

  PVkFenceCreateInfo = ^TVkFenceCreateInfo;
  TVkFenceCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkFenceCreateFlags;
  end;

  PVkSemaphoreCreateInfo = ^TVkSemaphoreCreateInfo;
  TVkSemaphoreCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkSemaphoreCreateFlags;
  end;

  PVkEventCreateInfo = ^TVkEventCreateInfo;
  TVkEventCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkEventCreateFlags;
  end;

  PVkQueryPoolCreateInfo = ^TVkQueryPoolCreateInfo;
  TVkQueryPoolCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkQueryPoolCreateFlags;
    queryType: TVkQueryType;
    queryCount: Uint32;
    pipelineStatistics: TVkQueryPipelineStatisticFlags;
  end;

  PVkBufferCreateInfo = ^TVkBufferCreateInfo;
  TVkBufferCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkBufferCreateFlags;
    size: TVkDeviceSize;
    usage: TVkBufferUsageFlags;
    sharingMode: TVkSharingMode;
    queueFamilyIndexCount: Uint32;
    pQueueFamilyIndices: PVKuint32;
  end;

  PVkBufferViewCreateInfo = ^TVkBufferViewCreateInfo;
  TVkBufferViewCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkBufferViewCreateFlags;
    buffer: TVkBuffer;
    format: TVkFormat;
    offset: TVkDeviceSize;
    range: TVkDeviceSize;
  end;

  PVkImageCreateInfo = ^TVkImageCreateInfo;
  TVkImageCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkImageCreateFlags;
    imageType: TVkImageType;
    format: TVkFormat;
    extent: TVkExtent3D;
    mipLevels: Uint32;
    arrayLayers: Uint32;
    samples: TVkSampleCountFlagBits;
    tiling: TVkImageTiling;
    usage: TVkImageUsageFlags;
    sharingMode: TVkSharingMode;
    queueFamilyIndexCount: Uint32;
    pQueueFamilyIndices: PVKuint32;
    initialLayout: TVkImageLayout;
  end;

  PVkSubresourceLayout = ^TVkSubresourceLayout;
  TVkSubresourceLayout = record
    offset: TVkDeviceSize;
    size: TVkDeviceSize;
    rowPitch: TVkDeviceSize;
    arrayPitch: TVkDeviceSize;
    depthPitch: TVkDeviceSize;
  end;

  PVkComponentMapping = ^TVkComponentMapping;
  TVkComponentMapping = record
    r: TVkComponentSwizzle;
    g: TVkComponentSwizzle;
    b: TVkComponentSwizzle;
    a: TVkComponentSwizzle;
  end;

  PVkImageSubresourceRange = ^TVkImageSubresourceRange;
  TVkImageSubresourceRange = record
    aspectMask: TVkImageAspectFlags;
    baseMipLevel: Uint32;
    levelCount: Uint32;
    baseArrayLayer: Uint32;
    layerCount: Uint32;
  end;

  PVkImageViewCreateInfo = ^TVkImageViewCreateInfo;
  TVkImageViewCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkImageViewCreateFlags;
    image: TVkImage;
    viewType: TVkImageViewType;
    format: TVkFormat;
    components: TVkComponentMapping;
    subresourceRange: TVkImageSubresourceRange;
  end;

  PVkShaderModuleCreateInfo = ^TVkShaderModuleCreateInfo;
  TVkShaderModuleCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkShaderModuleCreateFlags;
    codeSize: TVKsize;
    pCode: PVKuint32;
  end;

  PVkPipelineCacheCreateInfo = ^TVkPipelineCacheCreateInfo;
  TVkPipelineCacheCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkPipelineCacheCreateFlags;
    initialDataSize: TVKsize;
    pInitialData: Pointer;
  end;

  PVkSpecializationMapEntry = ^TVkSpecializationMapEntry;
  TVkSpecializationMapEntry = record
    constantID: Uint32;
    offset: Uint32;
    size: TVKsize;
  end;

  PVkSpecializationInfo = ^TVkSpecializationInfo;
  TVkSpecializationInfo = record
    mapEntryCount: Uint32;
    pMapEntries: PVkSpecializationMapEntry;
    dataSize: TVKsize;
    pData: Pointer;
  end;

  PVkPipelineShaderStageCreateInfo = ^TVkPipelineShaderStageCreateInfo;
  TVkPipelineShaderStageCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkPipelineShaderStageCreateFlags;
    stage: TVkShaderStageFlagBits;
    module: TVkShaderModule;
    pName: PVkChar;
    pSpecializationInfo: PVkSpecializationInfo;
  end;

  PVkVertexInputBindingDescription = ^TVkVertexInputBindingDescription;
  TVkVertexInputBindingDescription = record
    binding: Uint32;
    stride: Uint32;
    inputRate: TVkVertexInputRate;
  end;

  PVkVertexInputAttributeDescription = ^TVkVertexInputAttributeDescription;
  TVkVertexInputAttributeDescription = record
    location: Uint32;
    binding: Uint32;
    format: TVkFormat;
    offset: Uint32;
  end;

  PVkPipelineVertexInputStateCreateInfo = ^TVkPipelineVertexInputStateCreateInfo;
  TVkPipelineVertexInputStateCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkPipelineVertexInputStateCreateFlags;
    vertexBindingDescriptionCount: Uint32;
    pVertexBindingDescriptions: PVkVertexInputBindingDescription;
    vertexAttributeDescriptionCount: Uint32;
    pVertexAttributeDescriptions: PVkVertexInputAttributeDescription;
  end;

  PVkPipelineInputAssemblyStateCreateInfo = ^TVkPipelineInputAssemblyStateCreateInfo;
  TVkPipelineInputAssemblyStateCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkPipelineInputAssemblyStateCreateFlags;
    topology: TVkPrimitiveTopology;
    primitiveRestartEnable: TVkBool32;
  end;

  PVkPipelineTessellationStateCreateInfo = ^TVkPipelineTessellationStateCreateInfo;
  TVkPipelineTessellationStateCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkPipelineTessellationStateCreateFlags;
    patchControlPoints: Uint32;
  end;

  PVkViewport = ^TVkViewport;
  TVkViewport = record
    x: Single;
    y: Single;
    width: Single;
    height: Single;
    minDepth: Single;
    maxDepth: Single;
  end;

  PVkOffset2D = ^TVkOffset2D;
  TVkOffset2D = record
    x: TVKInt32;
    y: TVKInt32;
  end;

  PVkExtent2D = ^TVkExtent2D;
  TVkExtent2D = record
    width: Uint32;
    height: Uint32;
  end;

  PVkRect2D = ^TVkRect2D;
  TVkRect2D = record
    offset: TVkOffset2D;
    extent: TVkExtent2D;
  end;

  PVkPipelineViewportStateCreateInfo = ^TVkPipelineViewportStateCreateInfo;
  TVkPipelineViewportStateCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkPipelineViewportStateCreateFlags;
    viewportCount: Uint32;
    pViewports: PVkViewport;
    scissorCount: Uint32;
    pScissors: PVkRect2D;
  end;

  PVkPipelineRasterizationStateCreateInfo = ^TVkPipelineRasterizationStateCreateInfo;
  TVkPipelineRasterizationStateCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkPipelineRasterizationStateCreateFlags;
    depthClampEnable: TVkBool32;
    rasterizerDiscardEnable: TVkBool32;
    polygonMode: TVkPolygonMode;
    cullMode: TVkCullModeFlags;
    frontFace: TVkFrontFace;
    depthBiasEnable: TVkBool32;
    depthBiasConstantFactor: Single;
    depthBiasClamp: Single;
    depthBiasSlopeFactor: Single;
    lineWidth: Single;
  end;

  PVkPipelineMultisampleStateCreateInfo = ^TVkPipelineMultisampleStateCreateInfo;
  TVkPipelineMultisampleStateCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkPipelineMultisampleStateCreateFlags;
    rasterizationSamples: TVkSampleCountFlagBits;
    sampleShadingEnable: TVkBool32;
    minSampleShading: Single;
    pSampleMask: PVkSampleMask;
    alphaToCoverageEnable: TVkBool32;
    alphaToOneEnable: TVkBool32;
  end;

  PVkStencilOpState = ^TVkStencilOpState;
  TVkStencilOpState = record
    failOp: TVkStencilOp;
    passOp: TVkStencilOp;
    depthFailOp: TVkStencilOp;
    compareOp: TVkCompareOp;
    compareMask: Uint32;
    writeMask: Uint32;
    reference: Uint32;
  end;

  PVkPipelineDepthStencilStateCreateInfo = ^TVkPipelineDepthStencilStateCreateInfo;
  TVkPipelineDepthStencilStateCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkPipelineDepthStencilStateCreateFlags;
    depthTestEnable: TVkBool32;
    depthWriteEnable: TVkBool32;
    depthCompareOp: TVkCompareOp;
    depthBoundsTestEnable: TVkBool32;
    stencilTestEnable: TVkBool32;
    front: TVkStencilOpState;
    back: TVkStencilOpState;
    minDepthBounds: Single;
    maxDepthBounds: Single;
  end;

  PVkPipelineColorBlendAttachmentState = ^TVkPipelineColorBlendAttachmentState;
  TVkPipelineColorBlendAttachmentState = record
    blendEnable: TVkBool32;
    srcColorBlendFactor: TVkBlendFactor;
    dstColorBlendFactor: TVkBlendFactor;
    colorBlendOp: TVkBlendOp;
    srcAlphaBlendFactor: TVkBlendFactor;
    dstAlphaBlendFactor: TVkBlendFactor;
    alphaBlendOp: TVkBlendOp;
    colorWriteMask: TVkColorComponentFlags;
  end;

  PVkPipelineColorBlendStateCreateInfo = ^TVkPipelineColorBlendStateCreateInfo;
  TVkPipelineColorBlendStateCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkPipelineColorBlendStateCreateFlags;
    logicOpEnable: TVkBool32;
    logicOp: TVkLogicOp;
    attachmentCount: Uint32;
    pAttachments: PVkPipelineColorBlendAttachmentState;
    blendConstants: Array [0..3] of Single;
  end;

  PVkPipelineDynamicStateCreateInfo = ^TVkPipelineDynamicStateCreateInfo;
  TVkPipelineDynamicStateCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkPipelineDynamicStateCreateFlags;
    dynamicStateCount: Uint32;
    pDynamicStates: PVkDynamicState;
  end;

  PVkGraphicsPipelineCreateInfo = ^TVkGraphicsPipelineCreateInfo;
  TVkGraphicsPipelineCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkPipelineCreateFlags;
    stageCount: Uint32;
    pStages: PVkPipelineShaderStageCreateInfo;
    pVertexInputState: PVkPipelineVertexInputStateCreateInfo;
    pInputAssemblyState: PVkPipelineInputAssemblyStateCreateInfo;
    pTessellationState: TVkPipelineTessellationStateCreateInfo;
    pViewportState: PVkPipelineViewportStateCreateInfo;
    pRasterizationState: PVkPipelineRasterizationStateCreateInfo;
    pMultisampleState: PVkPipelineMultisampleStateCreateInfo;
    pDepthStencilState: PVkPipelineDepthStencilStateCreateInfo;
    pColorBlendState: PVkPipelineColorBlendStateCreateInfo;
    pDynamicState: PVkPipelineDynamicStateCreateInfo;
    layout: TVkPipelineLayout;
    renderPass: TVkRenderPass;
    subpass: Uint32;
    basePipelineHandle: TVkPipeline;
    basePipelineIndex: TVKInt32;
  end;

  PVkComputePipelineCreateInfo = ^TVkComputePipelineCreateInfo;
  TVkComputePipelineCreateInfo = record
    sType: 					TVkStructureType;
    pNext: 					Pointer;
    flags: 					TVkPipelineCreateFlags;
    stage: 					TVkPipelineShaderStageCreateInfo;
    layout: 				TVkPipelineLayout;
    basePipelineHandle: 	TVkPipeline;
    basePipelineIndex: 		TVKInt32;
  end;

  PVkPushConstantRange = ^TVkPushConstantRange;
  TVkPushConstantRange = record
    stageFlags: 			TVkShaderStageFlags;
    offset: 				Uint32;
    size: 					Uint32;
  end;

  PVkPipelineLayoutCreateInfo = ^TVkPipelineLayoutCreateInfo;
  TVkPipelineLayoutCreateInfo = record
    sType: 					TVkStructureType;
    pNext: 					Pointer;
    flags: 					TVkPipelineLayoutCreateFlags;
    setLayoutCount: 		Uint32;
    pSetLayouts: 			PVkDescriptorSetLayout;
    pushConstantRangeCount: Uint32;
    pPushConstantRanges: 	PVkPushConstantRange;
  end;

  PVkSamplerCreateInfo = ^TVkSamplerCreateInfo;
  TVkSamplerCreateInfo = record
    sType: 					TVkStructureType;
    pNext: 					Pointer;
    flags: 					TVkSamplerCreateFlags;
    magFilter: 				TVkFilter;
    minFilter: 				TVkFilter;
    mipmapMode: 			TVkSamplerMipmapMode;
    addressModeU: 			TVkSamplerAddressMode;
    addressModeV: 			TVkSamplerAddressMode;
    addressModeW: 			TVkSamplerAddressMode;
    mipLodBias: 			Single;
    anisotropyEnable: 		TVkBool32;
    maxAnisotropy:			Single;
    compareEnable: 			TVkBool32;
    compareOp: 				TVkCompareOp;
    minLod: 				Single;
    maxLod: 				Single;
    borderColor: 			TVkBorderColor;
    unnormalizedCoordinates:TVkBool32;
  end;

  PVkDescriptorSetLayoutBinding = ^TVkDescriptorSetLayoutBinding;
  TVkDescriptorSetLayoutBinding = record
    binding: 				Uint32;
    descriptorType: 		TVkDescriptorType;
    descriptorCount: 		Uint32;
    stageFlags: 			TVkShaderStageFlags;
    pImmutableSamplers: 	PVkSampler;
  end;

  PVkDescriptorSetLayoutCreateInfo = ^TVkDescriptorSetLayoutCreateInfo;
  TVkDescriptorSetLayoutCreateInfo = record
    sType: 					TVkStructureType;
    pNext: 					Pointer;
    flags: 					TVkDescriptorSetLayoutCreateFlags;
    bindingCount: 			Uint32;
    pBindings: 				PVkDescriptorSetLayoutBinding;
  end;

  PVkDescriptorPoolSize = ^TVkDescriptorPoolSize;
  TVkDescriptorPoolSize = record
    type_: 					TVkDescriptorType;
    descriptorCount: 		Uint32;
  end;

  PVkDescriptorPoolCreateInfo = ^TVkDescriptorPoolCreateInfo;
  TVkDescriptorPoolCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkDescriptorPoolCreateFlags;
    maxSets: Uint32;
    poolSizeCount: Uint32;
    pPoolSizes: PVkDescriptorPoolSize;
  end;

  PVkDescriptorSetAllocateInfo = ^TVkDescriptorSetAllocateInfo;
  TVkDescriptorSetAllocateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    descriptorPool: TVkDescriptorPool;
    descriptorSetCount: Uint32;
    pSetLayouts: PVkDescriptorSetLayout;
  end;

  PVkDescriptorImageInfo = ^TVkDescriptorImageInfo;
  TVkDescriptorImageInfo = record
    sampler: TVkSampler;
    imageView: TVkImageView;
    imageLayout: TVkImageLayout;
  end;

  PVkDescriptorBufferInfo = ^TVkDescriptorBufferInfo;
  TVkDescriptorBufferInfo = record
    buffer: TVkBuffer;
    offset: TVkDeviceSize;
    range: TVkDeviceSize;
  end;

  PVkWriteDescriptorSet = ^TVkWriteDescriptorSet;
  TVkWriteDescriptorSet = record
    sType: TVkStructureType;
    pNext: Pointer;
    dstSet: TVkDescriptorSet;
    dstBinding: Uint32;
    dstArrayElement: Uint32;
    descriptorCount: Uint32;
    descriptorType: TVkDescriptorType;
    pImageInfo: PVkDescriptorImageInfo;
    pBufferInfo: PVkDescriptorBufferInfo;
    pTexelBufferView: PVkBufferView;
  end;

  PVkCopyDescriptorSet = ^TVkCopyDescriptorSet;
  TVkCopyDescriptorSet = record
    sType: TVkStructureType;
    pNext: Pointer;
    srcSet: TVkDescriptorSet;
    srcBinding: Uint32;
    srcArrayElement: Uint32;
    dstSet: TVkDescriptorSet;
    dstBinding: Uint32;
    dstArrayElement: Uint32;
    descriptorCount: Uint32;
  end;

  PVkFramebufferCreateInfo = ^TVkFramebufferCreateInfo;
  TVkFramebufferCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkFramebufferCreateFlags;
    renderPass: TVkRenderPass;
    attachmentCount: Uint32;
    pAttachments: PVkImageView;
    width: Uint32;
    height: Uint32;
    layers: Uint32;
  end;

  PVkAttachmentDescription = ^TVkAttachmentDescription;
  TVkAttachmentDescription = record
    flags: TVkAttachmentDescriptionFlags;
    format: TVkFormat;
    samples: TVkSampleCountFlagBits;
    loadOp: TVkAttachmentLoadOp;
    storeOp: TVkAttachmentStoreOp;
    stencilLoadOp: TVkAttachmentLoadOp;
    stencilStoreOp: TVkAttachmentStoreOp;
    initialLayout: TVkImageLayout;
    finalLayout: TVkImageLayout;
  end;

  PVkAttachmentReference = ^TVkAttachmentReference;
  TVkAttachmentReference = record
    attachment: Uint32;
    layout: TVkImageLayout;
  end;

  PVkSubpassDescription = ^TVkSubpassDescription;
  TVkSubpassDescription = record
    flags: TVkSubpassDescriptionFlags;
    pipelineBindPoint: TVkPipelineBindPoint;
    inputAttachmentCount: Uint32;
    pInputAttachments: PVkAttachmentReference;
    colorAttachmentCount: Uint32;
    pColorAttachments: PVkAttachmentReference;
    pResolveAttachments: PVkAttachmentReference;
    pDepthStencilAttachment: PVkAttachmentReference;
    preserveAttachmentCount: Uint32;
    pPreserveAttachments: PVKuint32;
  end;

  PVkSubpassDependency = ^TVkSubpassDependency;
  TVkSubpassDependency = record
    srcSubpass: Uint32;
    dstSubpass: Uint32;
    srcStageMask: TVkPipelineStageFlags;
    dstStageMask: TVkPipelineStageFlags;
    srcAccessMask: TVkAccessFlags;
    dstAccessMask: TVkAccessFlags;
    dependencyFlags: TVkDependencyFlags;
  end;

  PVkRenderPassCreateInfo = ^TVkRenderPassCreateInfo;
  TVkRenderPassCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkRenderPassCreateFlags;
    attachmentCount: Uint32;
    pAttachments: PVkAttachmentDescription;
    subpassCount: Uint32;
    pSubpasses: PVkSubpassDescription;
    dependencyCount: Uint32;
    pDependencies: PVkSubpassDependency;
  end;

  PVkCommandPoolCreateInfo = ^TVkCommandPoolCreateInfo;
  TVkCommandPoolCreateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkCommandPoolCreateFlags;
    queueFamilyIndex: Uint32;
  end;

  PVkCommandBufferAllocateInfo = ^TVkCommandBufferAllocateInfo;
  TVkCommandBufferAllocateInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    commandPool: TVkCommandPool;
    level: TVkCommandBufferLevel;
    commandBufferCount: Uint32;
  end;

  PVkCommandBufferInheritanceInfo = ^TVkCommandBufferInheritanceInfo;
  TVkCommandBufferInheritanceInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    renderPass: TVkRenderPass;
    subpass: Uint32;
    framebuffer: TVkFramebuffer;
    occlusionQueryEnable: TVkBool32;
    queryFlags: TVkQueryControlFlags;
    pipelineStatistics: TVkQueryPipelineStatisticFlags;
  end;

  PVkCommandBufferBeginInfo = ^TVkCommandBufferBeginInfo;
  TVkCommandBufferBeginInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkCommandBufferUsageFlags;
    pInheritanceInfo: PVkCommandBufferInheritanceInfo;
  end;

  PVkBufferCopy = ^TVkBufferCopy;
  TVkBufferCopy = record
    srcOffset: TVkDeviceSize;
    dstOffset: TVkDeviceSize;
    size: TVkDeviceSize;
  end;

  PVkImageSubresourceLayers = ^TVkImageSubresourceLayers;  TVkImageSubresourceLayers = record
    aspectMask: TVkImageAspectFlags;
    mipLevel: Uint32;
    baseArrayLayer: Uint32;
    layerCount: Uint32;
  end;

  PVkImageCopy = ^TVkImageCopy;
  TVkImageCopy = record
    srcSubresource: TVkImageSubresourceLayers;
    srcOffset: TVkOffset3D;
    dstSubresource: TVkImageSubresourceLayers;
    dstOffset: TVkOffset3D;
    extent: TVkExtent3D;
  end;

  PVkImageBlit = ^TVkImageBlit;
  TVkImageBlit = record
    srcSubresource: TVkImageSubresourceLayers;
    srcOffsets: Array [0..1] of TVkOffset3D;
    dstSubresource: TVkImageSubresourceLayers;
    dstOffsets: Array [0..1] of TVkOffset3D;
  end;

  PVkBufferImageCopy = ^TVkBufferImageCopy;
  TVkBufferImageCopy = record
    bufferOffset: TVkDeviceSize;
    bufferRowLength: Uint32;
    bufferImageHeight: Uint32;
    imageSubresource: TVkImageSubresourceLayers;
    imageOffset: TVkOffset3D;
    imageExtent: TVkExtent3D;
  end;

  PVkClearColorValue = ^TVkClearColorValue;
  TVkClearColorValue = record
  case Byte of
    1: (float32: Array [0..3] of Single);
    2: (int32: Array [0..3] of Int32);
    3: (uint32: Array [0..3] of Uint32);
  end;

  PVkClearDepthStencilValue = ^TVkClearDepthStencilValue;
  TVkClearDepthStencilValue = record
    depth: Single;
    stencil: Uint32;
  end;

  PVkClearValue = ^TVkClearValue;
  TVkClearValue = record
  case Byte of
    1: (color: TVkClearColorValue);
    2: (depthStencil: TVkClearDepthStencilValue);
  end;

  PVkClearAttachment = ^TVkClearAttachment;
  TVkClearAttachment = record
    aspectMask: TVkImageAspectFlags;
    colorAttachment: Uint32;
    clearValue: TVkClearValue;
  end;

  PVkClearRect = ^TVkClearRect;
  TVkClearRect = record
    rect: TVkRect2D;
    baseArrayLayer: Uint32;
    layerCount: Uint32;
  end;

  PVkImageResolve = ^TVkImageResolve;
  TVkImageResolve = record
    srcSubresource: TVkImageSubresourceLayers;
    srcOffset: TVkOffset3D;
    dstSubresource: TVkImageSubresourceLayers;
    dstOffset: TVkOffset3D;
    extent: TVkExtent3D;
  end;

  PVkMemoryBarrier = ^TVkMemoryBarrier;
  TVkMemoryBarrier = record
    sType: TVkStructureType;
    pNext: Pointer;
    srcAccessMask: TVkAccessFlags;
    dstAccessMask: TVkAccessFlags;
  end;

  PVkBufferMemoryBarrier = ^TVkBufferMemoryBarrier;
  TVkBufferMemoryBarrier = record
    sType: TVkStructureType;
    pNext: Pointer;
    srcAccessMask: TVkAccessFlags;
    dstAccessMask: TvkAccessFlags;
    srcQueueFamilyIndex: Uint32;
    dstQueueFamilyIndex: Uint32;
    buffer: TVkBuffer;
    offset: TVkDeviceSize;
    size: TVkDeviceSize;
  end;

  PVkImageMemoryBarrier = ^TVkImageMemoryBarrier;
  TVkImageMemoryBarrier = record
    sType: TVkStructureType;
    pNext: Pointer;
    srcAccessMask: TVkAccessFlags;
    dstAccessMask: TVkAccessFlags;
    oldLayout: TVkImageLayout;
    newLayout: TVkImageLayout;
    srcQueueFamilyIndex: Uint32;
    dstQueueFamilyIndex: Uint32;
    image: TVkImage;
    subresourceRange: TVkImageSubresourceRange;
  end;

  PVkRenderPassBeginInfo = ^TVkRenderPassBeginInfo;
  TVkRenderPassBeginInfo = record
    sType: TVkStructureType;
    pNext: Pointer;
    renderPass: TVkRenderPass;
    framebuffer: TVkFramebuffer;
    renderArea: TVkRect2D;
    clearValueCount: Uint32;
    pClearValues: PVkClearValue;
  end;

  PVkDispatchIndirectCommand = ^TVkDispatchIndirectCommand;
  TVkDispatchIndirectCommand = record
    x: Uint32;
    y: Uint32;
    z: Uint32;
  end;

  PVkDrawIndexedIndirectCommand = ^TVkDrawIndexedIndirectCommand;
  TVkDrawIndexedIndirectCommand = record
    indexCount: Uint32;
    instanceCount: Uint32;
    firstIndex: Uint32;
    vertexOffset: TVKInt32;
    firstInstance: Uint32;
  end;

  PVkDrawIndirectCommand = ^TVkDrawIndirectCommand;
  TVkDrawIndirectCommand = record
    vertexCount: Uint32;
    instanceCount: Uint32;
    firstVertex: Uint32;
    firstInstance: Uint32;
  end;

type
  TvkCreateInstance = function (
                                const pCreateInfo: PVkInstanceCreateInfo;
                                const pAllocator: PVkAllocationCallbacks;
                                pInstance: PVkInstance): TVkResult; stdcall;

  TvkDestroyInstance = procedure (
                                instance: TVkInstance;
                                const pAllocator: PVkAllocationCallbacks); stdcall;

  TvkEnumeratePhysicalDevices = function (
                                instance: TVkInstance;
                                pPhysicalDeviceCount: PVKuint32;
                                pPhysicalDevices: PVkPhysicalDevice): TVkResult; stdcall;

  TvkGetPhysicalDeviceFeatures = procedure (
                                physicalDevice: TVkPhysicalDevice;
                                pFeatures: PVkPhysicalDeviceFeatures); stdcall;

  TvkGetPhysicalDeviceFormatProperties = procedure (
                                physicalDevice: TVkPhysicalDevice;
                                format: TVkFormat;
                                pFormatProperties: PVkFormatProperties); stdcall;

  TvkGetPhysicalDeviceImageFormatProperties = function (
                                physicalDevice: TVkPhysicalDevice;
                                format: TVkFormat;
                                type_: TVkImageType;
                                tiling: TVkImageTiling;
                                usage: TVkImageUsageFlags;
                                flags: TVkImageCreateFlags;
                                pImageFormatProperties: PVkImageFormatProperties): TVkResult;		 stdcall;

  TvkGetPhysicalDeviceProperties = procedure (
                                physicalDevice: TVkPhysicalDevice;
                                pProperties: PVkPhysicalDeviceProperties); stdcall;

  TvkGetPhysicalDeviceQueueFamilyProperties = procedure(
                                physicalDevice: TVkPhysicalDevice;
                                pQueueFamilyPropertyCount: PVKuint32;
                                pQueueFamilyProperties: PVkQueueFamilyProperties); stdcall;

  TvkGetPhysicalDeviceMemoryProperties = procedure (
                                physicalDevice: TVkPhysicalDevice;
                                pMemoryProperties: PVkPhysicalDeviceMemoryProperties); stdcall;

  TvkGetInstanceProcAddr = function (
                                instance: TVkInstance;
                                const pName: PVkChar): TvkVoidFunction; stdcall;

  TvkGetDeviceProcAddr = function (
                                instance: TVkInstance;
                                const pName: PVkChar): TvkVoidFunction;	 stdcall;

  TvkCreateDevice = function(
                                physicalDevice: TVkPhysicalDevice;
                                const pCreateInfo: PVkDeviceCreateInfo;
                                const pAllocator: PVkAllocationCallbacks;
                                pDevice: PVkDevice): TVkResult; stdcall;

  TvkDestroyDevice = procedure (
                                device: TVkDevice;
                                const pAllocator: PVkAllocationCallbacks); stdcall;

  TvkEnumerateInstanceExtensionProperties = function (
                                const pLayerName: PVkChar;
                                pPropertyCount: PVKuint32;
                                pProperties: PVkExtensionProperties): TVkResult; stdcall;

  TvkEnumerateDeviceExtensionProperties = function (
                                physicalDevice: TVkPhysicalDevice;
                                const pLayerName: PVkChar;
                                pPropertyCount: PVKuint32;
                                pProperties: PVkExtensionProperties): TVkResult; stdcall;

  TvkEnumerateInstanceLayerProperties = function (
                                pPropertyCount: PVKuint32;
                                pProperties: PVkLayerProperties): TVkResult; stdcall;

  TvkEnumerateDeviceLayerProperties = function (
                                physicalDevice: TVkPhysicalDevice;
                                pPropertyCount: PVKuint32;
                                pProperties: PVkLayerProperties): TVkResult; stdcall;

  TvkGetDeviceQueue = procedure (
                                device: TVkDevice;
                                queueFamilyIndex: Uint32;
                                queueIndex: Uint32;
                                pQueue: PVkQueue); stdcall;

  TvkQueueSubmit = function (
                                queue: TVkQueue;
                                submitCount: Uint32;
                                pSubmits: PVkSubmitInfo;
                                fence: TVkFence): TVkResult; stdcall;

  TvkQueueWaitIdle = function(
                                queue: TVkQueue): TVkResult; stdcall;

  TvkDeviceWaitIdle = function (
                                device: TVkDevice): TVkResult; stdcall;

  TvkAllocateMemory = function (
                                device: TVkDevice;
                                const pAllocateInfo: PVkMemoryAllocateInfo;
                                const pAllocator: PVkAllocationCallbacks;
                                pMemory: PVkDeviceMemory): TVkResult; stdcall;

  TvkFreeMemory = procedure (
                                device: TVkDevice;
                                memory: TVkDeviceMemory;
                                const pAllocator: PVkAllocationCallbacks); stdcall;

  TvkMapMemory = function (
                                device: TVkDevice;
                                memory: TVkDeviceMemory;
                                offset: TVkDeviceSize;
                                size: TVkDeviceSize;
                                flags: TVkMemoryMapFlags;
                                ppData: PPointer): TVkResult; 
								 stdcall;

  TvkUnmapMemory = procedure (
                                vkUnmapMemory: TVkDevice;
                                memory: TVkDeviceMemory);	 stdcall;

  TvkFlushMappedMemoryRanges = function (
                                device: TVkDevice;
                                memoryRangeCount: Uint32;
                                const pMemoryRanges: PVkMappedMemoryRange): TVkResult; stdcall;

  TvkInvalidateMappedMemoryRanges = function (
                                device: TVkDevice;
                                memoryRangeCount: Uint32;
                                const pMemoryRanges: PVkMappedMemoryRange): TVkResult; stdcall;

  TvkGetDeviceMemoryCommitment = procedure (
                                device: TVkDevice;
                                memory: TVkDeviceMemory;
                                pCommittedMemoryInBytes: PVkDeviceSize); stdcall;

  TvkBindBufferMemory = function (
                                device: TVkDevice;
                                buffer: TVkBuffer;
                                memory: TVkDeviceMemory;
                                memoryOffset: TVkDeviceSize): TVkResult; stdcall;

  TvkBindImageMemory = function (
                                device: TVkDevice;
                                image: TVkImage;
                                memory: TVkDeviceMemory;
                                memoryOffset: TVkDeviceSize): TVkResult; stdcall;

  TvkGetBufferMemoryRequirements = procedure (
                                device: TVkDevice;
                                buffer: TVkBuffer;
                                pMemoryRequirements: PVkMemoryRequirements); stdcall;

  TvkGetImageMemoryRequirements = procedure (
                                device: TVkDevice;
                                image: TVkImage;
                                pMemoryRequirements: PVkMemoryRequirements); stdcall;

  TvkGetImageSparseMemoryRequirements = procedure (
                                device: TVkDevice;
                                image: TVkImage;
                                pSparseMemoryRequirementCount: PVKuint32;
                                pSparseMemoryRequirements: PVkSparseImageMemoryRequirements);						 stdcall;

  TvkGetPhysicalDeviceSparseImageFormatProperties = procedure (
                                physicalDevice: TVkPhysicalDevice;
                                format: TVkFormat;
                                type_: TVkImageType;
                                samples: TVkSampleCountFlagBits;
                                usage: TVkImageUsageFlags;
                                tiling: TVkImageTiling;
                                pPropertyCount: PVKuint32;
                                pProperties: PVkSparseImageFormatProperties); stdcall;

  TvkQueueBindSparse = function (
                                queue: TVkQueue;
                                bindInfoCount: Uint32;
                                const pBindInfo: PVkBindSparseInfo;
                                fence: TVkFence): TVkResult;
								 stdcall;

  TvkCreateFence = function (
                                device: TVkDevice;
                                pCreateInfo: PVkFenceCreateInfo;
                                pAllocator: PVkAllocationCallbacks;
                                pFence: PVkFence): TVkResult;	 stdcall;

  TvkDestroyFence = procedure (
                                device: TVkDevice;
                                fence: TVkFence;
                                const pAllocator: TVkAllocationCallbacks); stdcall;


  TvkResetFences = function (
                                device: TVkDevice;
                                fenceCount: Uint32;
                                pFences: PVkFence): TVkResult; stdcall;

  TvkGetFenceStatus = function (
                                device: TVkDevice;
                                fence: TVkFence): TVkResult; stdcall;

  TvkWaitForFences = function (
                                device: TVkDevice;
                                fenceCount: Uint32;
                                const pFences: PVkFence;
                                waitAll: TVkBool32;
                                timeout: TVKUInt64): TVkResult;
								 stdcall;

  TvkCreateSemaphore = function (
                                device: TVkDevice;
                                pCreateInfo: PVkSemaphoreCreateInfo;
                                pAllocator: PVkAllocationCallbacks;
                                pSemaphore: PVkSemaphore): TVkResult;	 stdcall;


  TvkDestroySemaphore = procedure (
                                device: TVkDevice;
                                semaphore: TVkSemaphore;
                                const pAllocator: PVkAllocationCallbacks); stdcall;

  TvkCreateEvent = function (
                                device: TVkDevice;
                                pCreateInfo: PVkEventCreateInfo;
                                const pAllocator: PVkAllocationCallbacks;
                                pEvent: PVkEvent): TVkResult;	 stdcall;

  TvkDestroyEvent = procedure (
                                device: TVkDevice;
                                event: TVkEvent;
                                const pAllocator: PVkAllocationCallbacks);
								 stdcall;

  TvkGetEventStatus = function (
                                device: TVkDevice;
                                event: TVkEvent): TVkResult; stdcall;

  TvkSetEvent = function (
                                device: TVkDevice;
                                event: TVkEvent): TVkResult; stdcall;

  TvkResetEvent = function (
                                device: TVkDevice;
                                event: TVkEvent): TVkResult; stdcall;

  TvkCreateQueryPool = function (
                                device: TVkDevice;
                                const pCreateInfo: PVkQueryPoolCreateInfo;
                                const pAllocator: PVkAllocationCallbacks;
                                pQueryPool: PVkQueryPool): TVkResult;	 stdcall;

  TvkDestroyQueryPool = procedure (
                                device: TVkDevice;
                                queryPool: TVkQueryPool;
                                const pAllocator: PVkAllocationCallbacks); stdcall;

  TvkGetQueryPoolResults = function (
                                device: TVkDevice;
                                queryPool: TVkQueryPool;
                                firstQuery: Uint32;
                                queryCount: Uint32;
                                dataSize: TVKsize;
                                pData: Pointer;
                                stride: TVkDeviceSize;
                                flags: TVkQueryResultFlags): TVkResult; 
								 stdcall;

  TvkCreateBuffer = function (
                                device: TVkDevice;
                                const pCreateInfo: PVkBufferCreateInfo;
                                const pAllocator: PVkAllocationCallbacks;
                                pBuffer: PVkBuffer): TVkResult; 
								 stdcall;

  TvkDestroyBuffer = procedure (
                                device: TVkDevice;
                                buffer: TVkBuffer;
                                pAllocator: PVkAllocationCallbacks); 
								 stdcall;

  TvkCreateBufferView = function (
                                device: TVkDevice;
                                const pCreateInfo: PVkBufferViewCreateInfo;
                                const pAllocator: PVkAllocationCallbacks;
                                pView: PVkBufferView): TVkResult; 
								 stdcall;

  TvkDestroyBufferView = procedure (
                                device: TVkDevice;
                                bufferView: TVkBufferView;
                                const pAllocator: PVkAllocationCallbacks); 
								 stdcall;

  TvkCreateImage = function (
                                device: TVkDevice;
                                pCreateInfo: PVkImageCreateInfo;
                                pAllocator: PVkAllocationCallbacks;
                                pImage: PVkImage): TVkResult; 
								 stdcall;

  TvkDestroyImage = procedure (
                                device: TVkDevice;
                                image: TVkImage;
                                pAllocator: PVkAllocationCallbacks);
								 stdcall;

  TvkGetImageSubresourceLayout = procedure (
                                device: TVkDevice;
                                image: TVkImage;
                                const pSubresource: PVkImageSubresource;
                                pLayout: PVkSubresourceLayout); 
								 stdcall;

  TvkCreateImageView = function (
                                device: TVkDevice;
                                const pCreateInfo: PVkImageViewCreateInfo;
                                const pAllocator: PVkAllocationCallbacks;
                                pView: PVkImageView): TVkResult; 
								 stdcall;

  TvkDestroyImageView = procedure (
                                device: TVkDevice;
                                imageView: TVkImageView;
                                const pAllocator: PVkAllocationCallbacks); 
								 stdcall;

  TvkCreateShaderModule = function (
                                device: TVkDevice;
                                const pCreateInfo: PVkShaderModuleCreateInfo;
                                const pAllocator: PVkAllocationCallbacks;
                                pShaderModule: PVkShaderModule): TVkResult; 
								 stdcall;

  TvkDestroyShaderModule = procedure (
                                device: TVkDevice;
                                shaderModule: TVkShaderModule;
                                const pAllocator: PVkAllocationCallbacks); 
								 stdcall;

  TvkCreatePipelineCache = function (
                                device: TVkDevice;
                                pCreateInfo: PVkPipelineCacheCreateInfo;
                                const pAllocator: PVkAllocationCallbacks;
                                pPipelineCache: PVkPipelineCache): TVkResult; 
								 stdcall;

  TvkDestroyPipelineCache = procedure (
                                device: TVkDevice;
                                pipelineCache: TVkPipelineCache;
                                const pAllocator: PVkAllocationCallbacks); 
								 stdcall;

  TvkGetPipelineCacheData = function (
                                device: TVkDevice;
                                pipelineCache: TVkPipelineCache;
                                pDataSize: PVKsize;
                                pData: Pointer): TVkResult;
								 stdcall;

  TvkMergePipelineCaches = function (
                                device: TVkDevice;
                                dstCache: TVkPipelineCache;
                                srcCacheCount: Uint32;
                                const pSrcCaches: PVkPipelineCache): TVkResult; 
								 stdcall;

  TvkCreateGraphicsPipelines = function (
                                device: TVkDevice;
                                pipelineCache: TVkPipelineCache;
                                createInfoCount: Uint32;
                                const pCreateInfos: PVkGraphicsPipelineCreateInfo;
                                const pAllocator: PVkAllocationCallbacks;
                                pPipelines: PVkPipeline): TVkResult; 
								 stdcall;

  TvkCreateComputePipelines = function (
                                device: TVkDevice;
                                pipelineCache: TVkPipelineCache;
                                createInfoCount: Uint32;
                                const pCreateInfos: PVkComputePipelineCreateInfo;
                                const pAllocator: PVkAllocationCallbacks;
                                pPipelines: PVkPipeline): TVkResult; 
								 stdcall;

  TvkDestroyPipeline = procedure (
                                device: TVkDevice;
                                pipeline: TVkPipeline;
                                const pAllocator: PVkAllocationCallbacks); 
								 stdcall;

  TvkCreatePipelineLayout = function (
                                device: TVkDevice;
                                const pCreateInfo: PVkPipelineLayoutCreateInfo;
                                const pAllocator: PVkAllocationCallbacks;
                                pPipelineLayout: PVkPipelineLayout): TVkResult; 
								 stdcall;

  TvkDestroyPipelineLayout = procedure (
                                device: TVkDevice;
                                pipelineLayout: TVkPipelineLayout;
                                const pAllocator: PVkAllocationCallbacks); 
								 stdcall;

  TvkCreateSampler = function (
                                device: TVkDevice;
                                pCreateInfo: PVkSamplerCreateInfo;
                                const pAllocator: PVkAllocationCallbacks;
                                pSampler: PVkSampler): TVkResult; 
								 stdcall;

  TvkDestroySampler = procedure (
                                device: TVkDevice;
                                sampler: TVkSampler;
                                const pAllocator: PVkAllocationCallbacks); 
								 stdcall;

  TvkCreateDescriptorSetLayout = function (
                                device: TVkDevice;
                                const pCreateInfo: PVkDescriptorSetLayoutCreateInfo;
                                const pAllocator: PVkAllocationCallbacks;
                                pSetLayout: PVkDescriptorSetLayout): TVkResult; 
								 stdcall;

  TvkDestroyDescriptorSetLayout = procedure (
                                device: TVkDevice;
                                descriptorSetLayout: TVkDescriptorSetLayout;
                                const pAllocator: PVkAllocationCallbacks); 
								 stdcall;

  TvkCreateDescriptorPool = function (
                                device: TVkDevice;
                                pCreateInfo: PVkDescriptorPoolCreateInfo;
                                const pAllocator: PVkAllocationCallbacks;
                                pDescriptorPool: PVkDescriptorPool): TVkResult; 
								 stdcall;

  TvkDestroyDescriptorPool = procedure (
                                device: TVkDevice;
                                descriptorPool: TVkDescriptorPool;
                                const pAllocator: PVkAllocationCallbacks); 
								 stdcall;

  TvkResetDescriptorPool = function (
                                device: TVkDevice;
                                descriptorPool: TVkDescriptorPool;
                                flags: TVkDescriptorPoolResetFlags): TVkResult; 
								 stdcall;

  TvkAllocateDescriptorSets = function (
                                device: TVkDevice;
                                const pAllocateInfo: PVkDescriptorSetAllocateInfo;
                                pDescriptorSets: PVkDescriptorSet): TVkResult; 
								 stdcall;

  TvkFreeDescriptorSets = function (
                                device: TVkDevice;
                                descriptorPool: TVkDescriptorPool;
                                descriptorSetCount: Uint32;
                                const pDescriptorSets: PVkDescriptorSet): TVkResult; 
								 stdcall;

  TvkUpdateDescriptorSets = procedure (
                                device: TVkDevice;
                                descriptorWriteCount: Uint32;
                                const pDescriptorWrites: PVkWriteDescriptorSet;
                                descriptorCopyCount: Uint32;
                                const pDescriptorCopies: PVkCopyDescriptorSet); 
								 stdcall;

  TvkCreateFramebuffer = function (
                                device: TVkDevice;
                                const pCreateInfo: PVkFramebufferCreateInfo;
                                const pAllocator: PVkAllocationCallbacks;
                                pFramebuffer: PVkFramebuffer): TVkResult; 
								 stdcall;

  TvkDestroyFramebuffer = procedure (
                                device: TVkDevice;
                                framebuffer: TVkFramebuffer;
                                const pAllocator: PVkAllocationCallbacks); 
								 stdcall;

  TvkCreateRenderPass = function (
                                device: TVkDevice;
                                pCreateInfo: PVkRenderPassCreateInfo;
                                const pAllocator: PVkAllocationCallbacks;
                                pRenderPass: PVkRenderPass): TVkResult; 
								 stdcall;

  TvkDestroyRenderPass = procedure (
                                device: TVkDevice;
                                renderPass: TVkRenderPass;
                                const pAllocator: PVkAllocationCallbacks); 
								 stdcall;

  TvkGetRenderAreaGranularity = procedure (
                                device: TVkDevice;
                                renderPass: TVkRenderPass;
                                pGranularity: PVkExtent2D); 
								 stdcall;

  TvkCreateCommandPool = function (
                                device: TVkDevice;
                                const pCreateInfo: PVkCommandPoolCreateInfo;
                                const pAllocator: PVkAllocationCallbacks;
                                pCommandPool: PVkCommandPool): TVkResult; 
								 stdcall;

  TvkDestroyCommandPool = procedure (
                                device: TVkDevice;
                                commandPool: TVkCommandPool;
                                const pAllocator: PVkAllocationCallbacks); 
								 stdcall;

  TvkResetCommandPool = function (
                                device: TVkDevice;
                                commandPool: TVkCommandPool;
                                flags: TVkCommandPoolResetFlags): TVkResult; 
								 stdcall;

  TvkAllocateCommandBuffers = function (
                                device: TVkDevice;
                                pAllocateInfo: PVkCommandBufferAllocateInfo;
                                pCommandBuffers: PVkCommandBuffer): TVkResult; 
								 stdcall;

  TvkFreeCommandBuffers = procedure (
                                device: TVkDevice;
                                commandPool: TVkCommandPool;
                                commandBufferCount: Uint32;
                                const pCommandBuffers: PVkCommandBuffer); 
								 stdcall;

  TvkBeginCommandBuffer = function (
                                commandBuffer: TVkCommandBuffer;
                                const pBeginInfo: PVkCommandBufferBeginInfo): TVkResult; 
								 stdcall;

  TvkEndCommandBuffer = function (
                                commandBuffer: TVkCommandBuffer): TVkResult; 
								 stdcall;

  TvkResetCommandBuffer = function (
                                commandBuffer: TVkCommandBuffer;
                                flags: TVkCommandBufferResetFlags): TVkResult; 
								 stdcall;

  TvkCmdBindPipeline = procedure (
                                commandBuffer: TVkCommandBuffer;
                                pipelineBindPoint: TVkPipelineBindPoint;
                                pipeline: TVkPipeline); 
								 stdcall;

  TvkCmdSetViewport = procedure (
                                commandBuffer: TVkCommandBuffer;
                                firstViewport: Uint32;
                                viewportCount: Uint32;
                                pViewports: PVkViewport); 
								 stdcall;

  TvkCmdSetScissor = procedure (
                                commandBuffer: TVkCommandBuffer;
                                firstScissor: Uint32;
                                scissorCount: Uint32;
                                pScissors: PVkRect2D); 
								 stdcall;

  TvkCmdSetLineWidth = procedure (
                                commandBuffer: TVkCommandBuffer;
                                lineWidth: Single); 
								 stdcall;

  TvkCmdSetDepthBias = procedure (
                                commandBuffer: TVkCommandBuffer;
                                depthBiasConstantFactor: Single;
                                depthBiasClamp: Single;
                                depthBiasSlopeFactor: Single); 
								 stdcall;

  TVkBlendConstants_ = Array [0..3] of Single;
  TvkCmdSetBlendConstants = procedure (
                                commandBuffer: TVkCommandBuffer;
                                const blendConstants: TVkBlendConstants_); 
								 stdcall;

  TvkCmdSetDepthBounds = procedure (
                                commandBuffer: TVkCommandBuffer;
                                minDepthBounds: Single;
                                maxDepthBounds: Single); 
								 stdcall;

  TvkCmdSetStencilCompareMask = procedure (
                                commandBuffer: TVkCommandBuffer;
                                faceMask: TVkStencilFaceFlags;
                                compareMask: Uint32);
								 stdcall;

  TvkCmdSetStencilWriteMask = procedure (
                                commandBuffer: TVkCommandBuffer;
                                faceMask: TVkStencilFaceFlags;
                                writeMask: Uint32);
								 stdcall;

  TvkCmdSetStencilReference = procedure (
                                commandBuffer: TVkCommandBuffer;
                                faceMask: TVkStencilFaceFlags;
                                reference: Uint32);
								 stdcall;

  TvkCmdBindDescriptorSets = procedure (
                                commandBuffer: TVkCommandBuffer;
                                pipelineBindPoint: TVkPipelineBindPoint;
                                layout: TVkPipelineLayout;
                                firstSet: Uint32;
                                descriptorSetCount: Uint32;
                                const pDescriptorSets: PVkDescriptorSet;
                                dynamicOffsetCount: Uint32;
                                const pDynamicOffsets: PVKuint32);
								 stdcall;

  TvkCmdBindIndexBuffer = procedure (
                                commandBuffer: TVkCommandBuffer;
                                buffer: TVkBuffer;
                                offset: TVkDeviceSize;
                                indexType: TVkIndexType); 
								 stdcall;

  TvkCmdBindVertexBuffers = procedure (
                                commandBuffer: TVkCommandBuffer;
                                firstBinding: Uint32;
                                bindingCount: Uint32;
                                const pBuffers: PVkBuffer;
                                const pOffsets: PVkDeviceSize); 
								 stdcall;

  TvkCmdDraw = procedure (
                                commandBuffer: TVkCommandBuffer;
                                vertexCount: Uint32;
                                instanceCount: Uint32;
                                firstVertex: Uint32;
                                firstInstance: Uint32);
								 stdcall;

  TvkCmdDrawIndexed = procedure (
                                commandBuffer: TVkCommandBuffer;
                                indexCount: Uint32;
                                instanceCount: Uint32;
                                firstIndex: Uint32;
                                vertexOffset: TVKInt32;
                                firstInstance: Uint32);
								 stdcall;

  TvkCmdDrawIndirect = procedure (
                                commandBuffer: TVkCommandBuffer;
                                buffer: TVkBuffer;
                                offset: TVkDeviceSize;
                                drawCount: Uint32;
                                stride: Uint32);
								 stdcall;

  TvkCmdDrawIndexedIndirect = procedure (
                                commandBuffer: TVkCommandBuffer;
                                buffer: TVkBuffer;
                                offset: TVkDeviceSize;
                                drawCount: Uint32;
                                stride: Uint32);
								 stdcall;

  TvkCmdDispatch = procedure (
                                commandBuffer: TVkCommandBuffer;
                                x: Uint32;
                                y: Uint32;
                                z: Uint32);
								 stdcall;

  TvkCmdDispatchIndirect = procedure (
                                commandBuffer: TVkCommandBuffer;
                                buffer: TVkBuffer;
                                offset: TVkDeviceSize);
								 stdcall;

  TvkCmdCopyBuffer = procedure (
                                commandBuffer: TVkCommandBuffer;
                                srcBuffer: TVkBuffer;
                                dstBuffer: TVkBuffer;
                                regionCount: Uint32;
                                const pRegions: PVkBufferCopy); 
								 stdcall;

  TvkCmdCopyImage = procedure (
                                commandBuffer: TVkCommandBuffer;
                                srcImage: TVkImage;
                                srcImageLayout: TVkImageLayout;
                                dstImage: TVkImage;
                                dstImageLayout: TVkImageLayout;
                                regionCount: Uint32;
                                const pRegions: PVkImageCopy); 
								 stdcall;

  TvkCmdBlitImage = procedure (
                                commandBuffer: TVkCommandBuffer;
                                srcImage: TVkImage;
                                srcImageLayout: TVkImageLayout;
                                dstImage: TVkImage;
                                dstImageLayout: TVkImageLayout;
                                regionCount: Uint32;
                                const pRegions: PVkImageCopy;
                                filter: TVkFilter); 
								 stdcall;

  TvkCmdCopyBufferToImage = procedure (
                                commandBuffer: TVkCommandBuffer;
                                srcBuffer: TVkBuffer;
                                dstImage: TVkImage;
                                dstImageLayout: TVkImageLayout;
                                regionCount: Uint32;
                                const pRegions: PVkBufferImageCopy); 
								 stdcall;

  TvkCmdCopyImageToBuffer = procedure (
                                commandBuffer: TVkCommandBuffer;
                                srcImage: TVkImage;
                                srcImageLayout: TVkImageLayout;
                                dstBuffer: TVkBuffer;
                                regionCount: Uint32;
                                const pRegions: PVkBufferImageCopy); 
								 stdcall;

  TvkCmdUpdateBuffer = procedure (
                                commandBuffer: TVkCommandBuffer;
                                dstBuffer: TVkBuffer;
                                dstOffset: TVkDeviceSize;
                                dataSize: TVkDeviceSize;
                                const pData: PVKuint32);
								 stdcall;

  TvkCmdFillBuffer = procedure (
                                commandBuffer: TVkCommandBuffer;
                                dstBuffer: TVkBuffer;
                                dstOffset: TVkDeviceSize;
                                dataSize: TVkDeviceSize;
                                data: Uint32);
								 stdcall;

  TvkCmdClearColorImage = procedure (
                                commandBuffer: TVkCommandBuffer;
                                image: TVkImage;
                                imageLayout: TVkImageLayout;
                                const pColor: PVkClearColorValue;
                                rangeCount: Uint32;
                                const pRanges: PVkImageSubresourceRange); 
								 stdcall;

  TvkCmdClearDepthStencilImage = procedure (
                                commandBuffer: TVkCommandBuffer;
                                image: TVkImage;
                                imageLayout: TVkImageLayout;
                                const pDepthStencil: PVkClearDepthStencilValue;
                                rangeCount: Uint32;
                                const pRanges: PVkImageSubresourceRange); 
								 stdcall;

  TvkCmdClearAttachments = procedure (
                                commandBuffer: TVkCommandBuffer;
                                attachmentCount: Uint32;
                                const pAttachments: PVkClearAttachment;
                                rectCount: Uint32;
                                const pRects: PVkClearRect); 
								 stdcall;

  TvkCmdResolveImage = procedure (
                                commandBuffer: TVkCommandBuffer;
                                srcImage: TVkImage;
                                srcImageLayout: TVkImageLayout;
                                dstImage: TVkImage;
                                dstImageLayout: TVkImageLayout;
                                regionCount: Uint32;
                                const pRegions: PVkImageResolve); 
								 stdcall;

  TvkCmdSetEvent = procedure (
                                commandBuffer: TVkCommandBuffer;
                                event: TVkEvent;
                                stageMask: TVkPipelineStageFlags); 
								 stdcall;

  TvkCmdResetEvent = procedure (
                                commandBuffer: TVkCommandBuffer;
                                event: TVkEvent;
                                stageMask: TVkPipelineStageFlags); 
								 stdcall;

  TvkCmdWaitEvents = procedure (
                                commandBuffer: TVkCommandBuffer;
                                eventCount: Uint32;
                                const pEvents: PVkEvent;
                                srcStageMask: TVkPipelineStageFlags;
                                dstStageMask: TVkPipelineStageFlags;
                                memoryBarrierCount: Uint32;
                                const pMemoryBarriers: PVkMemoryBarrier;
                                bufferMemoryBarrierCount: Uint32;
                                const pBufferMemoryBarriers: PVkBufferMemoryBarrier;
                                imageMemoryBarrierCount: Uint32;
                                const pImageMemoryBarriers: PVkImageMemoryBarrier);
								 stdcall;

  TvkCmdPipelineBarrier = procedure (
                                commandBuffer: TVkCommandBuffer;
                                srcStageMask: TVkPipelineStageFlags;
                                dstStageMask: TVkPipelineStageFlags;
                                dependencyFlags: TVkDependencyFlags;
                                memoryBarrierCount: Uint32;
                                const pMemoryBarriers: PVkMemoryBarrier;
                                bufferMemoryBarrierCount: Uint32;
                                const pBufferMemoryBarriers: PVkBufferMemoryBarrier;
                                imageMemoryBarrierCount: Uint32;
                                const pImageMemoryBarriers: PVkImageMemoryBarrier); 
								 stdcall;

  TvkCmdBeginQuery = procedure (
                                commandBuffer: TVkCommandBuffer;
                                queryPool: TVkQueryPool;
                                query: Uint32;
                                flags: TVkQueryControlFlags); 
								 stdcall;

  TvkCmdEndQuery = procedure (
                                commandBuffer: TVkCommandBuffer;
                                queryPool: TVkQueryPool;
                                query: Uint32);
								 stdcall;

  TvkCmdResetQueryPool = procedure (
                                commandBuffer: TVkCommandBuffer;
                                queryPool: TVkQueryPool;
                                firstQuery: Uint32;
                                queryCount: Uint32);
								 stdcall;

  TvkCmdWriteTimestamp = procedure (
                                commandBuffer: TVkCommandBuffer;
                                pipelineStage: TVkPipelineStageFlagBits;
                                queryPool: TVkQueryPool;
                                query: Uint32);
								 stdcall;

  TvkCmdCopyQueryPoolResults = procedure (
                                commandBuffer: TVkCommandBuffer;
                                queryPool: TVkQueryPool;
                                query: Uint32;
                                firstQuery: Uint32;
                                queryCount: Uint32;
                                dstBuffer: TVkBuffer;
                                dstOffset: TVkDeviceSize;
                                stride: TVkDeviceSize;
                                flags: TVkQueryResultFlags); 
								 stdcall;

  TvkCmdPushConstants = procedure (
                                commandBuffer: TVkCommandBuffer;
                                layout: TVkPipelineLayout;
                                stageFlags: TVkShaderStageFlags;
                                offset: Uint32;
                                size: Uint32;
                                const pValues: Pointer); 
								 stdcall;

  TvkCmdBeginRenderPass = procedure (
                                commandBuffer: TVkCommandBuffer;
                                const pRenderPassBegin: PVkRenderPassBeginInfo;
                                contents: TVkSubpassContents); 
								 stdcall;

  TvkCmdNextSubpass = procedure (
                                commandBuffer: TVkCommandBuffer;
                                contents: TVkSubpassContents); 
								 stdcall;

  TvkCmdEndRenderPass = procedure (
                                commandBuffer: TVkCommandBuffer); 
								 stdcall;

  TvkCmdExecuteCommands = procedure (
                                commandBuffer: TVkCommandBuffer;
                                commandBufferCount: Uint32;
                                const pCommandBuffers: PVkCommandBuffer); 
								 stdcall;

{$IFNDEF VK_NO_PROTOTYPES}
var
  vkCreateInstance: TvkCreateInstance;
  vkDestroyInstance: TvkDestroyInstance;
  vkEnumeratePhysicalDevices: TvkEnumeratePhysicalDevices;
  vkGetPhysicalDeviceFeatures: TvkGetPhysicalDeviceFeatures;
  vkGetPhysicalDeviceFormatProperties: TvkGetPhysicalDeviceFormatProperties;
  vkGetPhysicalDeviceImageFormatProperties: TvkGetPhysicalDeviceImageFormatProperties;
  vkGetPhysicalDeviceProperties: TvkGetPhysicalDeviceProperties;
  vkGetPhysicalDeviceQueueFamilyProperties: TvkGetPhysicalDeviceQueueFamilyProperties;
  vkGetPhysicalDeviceMemoryProperties: TvkGetPhysicalDeviceMemoryProperties;
  vkGetInstanceProcAddr: TvkGetInstanceProcAddr;
  vkGetDeviceProcAddr: TvkGetDeviceProcAddr;
  vkCreateDevice: TvkCreateDevice;
  vkDestroyDevice: TvkDestroyDevice;
  vkEnumerateInstanceExtensionProperties: TvkEnumerateInstanceExtensionProperties;
  vkEnumerateDeviceExtensionProperties: TvkEnumerateDeviceExtensionProperties;
  vkEnumerateInstanceLayerProperties: TvkEnumerateInstanceLayerProperties;
  vkEnumerateDeviceLayerProperties: TvkEnumerateDeviceLayerProperties;
  vkGetDeviceQueue: TvkGetDeviceQueue;
  vkQueueSubmit: TvkQueueSubmit;
  vkQueueWaitIdle: TvkQueueWaitIdle;
  vkDeviceWaitIdle: TvkDeviceWaitIdle;
  vkAllocateMemory: TvkAllocateMemory;
  vkFreeMemory: TvkFreeMemory;
  vkMapMemory: TvkMapMemory;
  vkUnmapMemory: TvkUnmapMemory;
  vkFlushMappedMemoryRanges: TvkFlushMappedMemoryRanges;
  vkInvalidateMappedMemoryRanges: TvkInvalidateMappedMemoryRanges;
  vkGetDeviceMemoryCommitment: TvkGetDeviceMemoryCommitment;
  vkBindBufferMemory: TvkBindBufferMemory;
  vkBindImageMemory: TvkBindImageMemory;
  vkGetBufferMemoryRequirements: TvkGetBufferMemoryRequirements;
  vkGetImageMemoryRequirements: TvkGetImageMemoryRequirements;
  vkGetImageSparseMemoryRequirements: TvkGetImageSparseMemoryRequirements;
  vkGetPhysicalDeviceSparseImageFormatProperties: TvkGetPhysicalDeviceSparseImageFormatProperties;
  vkQueueBindSparse: TvkQueueBindSparse;
  vkCreateFence: TvkCreateFence;
  vkDestroyFence: TvkDestroyFence;
  vkResetFences: TvkResetFences;
  vkGetFenceStatus: TvkGetFenceStatus;
  vkWaitForFences: TvkWaitForFences;
  vkCreateSemaphore: TvkCreateSemaphore;
  vkDestroySemaphore: TvkDestroySemaphore;
  vkCreateEvent: TvkCreateEvent;
  vkDestroyEvent: TvkDestroyEvent;
  vkGetEventStatus: TvkGetEventStatus;
  vkSetEvent: TvkSetEvent;
  vkResetEvent: TvkResetEvent;
  vkCreateQueryPool: TvkCreateQueryPool;
  vkDestroyQueryPool: TvkDestroyQueryPool;
  vkGetQueryPoolResults: TvkGetQueryPoolResults;
  vkCreateBuffer: TvkCreateBuffer;
  vkDestroyBuffer: TvkDestroyBuffer;
  vkCreateBufferView: TvkCreateBufferView;
  vkDestroyBufferView: TvkDestroyBufferView;
  vkCreateImage: TvkCreateImage;
  vkDestroyImage: TvkDestroyImage;
  vkGetImageSubresourceLayout: TvkGetImageSubresourceLayout;
  vkCreateImageView: TvkCreateImageView;
  vkDestroyImageView: TvkDestroyImageView;
  vkCreateShaderModule: TvkCreateShaderModule;
  vkDestroyShaderModule: TvkDestroyShaderModule;
  vkCreatePipelineCache: TvkCreatePipelineCache;
  vkDestroyPipelineCache: TvkDestroyPipelineCache;
  vkGetPipelineCacheData: TvkGetPipelineCacheData;
  vkMergePipelineCaches: TvkMergePipelineCaches;
  vkCreateGraphicsPipelines: TvkCreateGraphicsPipelines;
  vkCreateComputePipelines: TvkCreateComputePipelines;
  vkDestroyPipeline: TvkDestroyPipeline;
  vkCreatePipelineLayout: TvkCreatePipelineLayout;
  vkDestroyPipelineLayout: TvkDestroyPipelineLayout;
  vkCreateSampler: TvkCreateSampler;
  vkDestroySampler: TvkDestroySampler;
  vkCreateDescriptorSetLayout: TvkCreateDescriptorSetLayout;
  vkDestroyDescriptorSetLayout: TvkDestroyDescriptorSetLayout;
  vkCreateDescriptorPool: TvkCreateDescriptorPool;
  vkDestroyDescriptorPool: TvkDestroyDescriptorPool;
  vkResetDescriptorPool: TvkResetDescriptorPool;
  vkAllocateDescriptorSets: TvkAllocateDescriptorSets;
  vkFreeDescriptorSets: TvkFreeDescriptorSets;
  vkUpdateDescriptorSets: TvkUpdateDescriptorSets;
  vkCreateFramebuffer: TvkCreateFramebuffer;
  vkDestroyFramebuffer: TvkDestroyFramebuffer;
  vkCreateRenderPass: TvkCreateRenderPass;
  vkDestroyRenderPass: TvkDestroyRenderPass;
  vkGetRenderAreaGranularity: TvkGetRenderAreaGranularity;
  vkCreateCommandPool: TvkCreateCommandPool;
  vkDestroyCommandPool: TvkDestroyCommandPool;
  vkResetCommandPool: TvkResetCommandPool;
  vkAllocateCommandBuffers: TvkAllocateCommandBuffers;
  vkFreeCommandBuffers: TvkFreeCommandBuffers;
  vkBeginCommandBuffer: TvkBeginCommandBuffer;
  vkEndCommandBuffer: TvkEndCommandBuffer;
  vkResetCommandBuffer: TvkResetCommandBuffer;
  vkCmdBindPipeline: TvkCmdBindPipeline;
  vkCmdSetViewport: TvkCmdSetViewport;
  vkCmdSetScissor: TvkCmdSetScissor;
  vkCmdSetLineWidth: TvkCmdSetLineWidth;
  vkCmdSetDepthBias: TvkCmdSetDepthBias;
  vkCmdSetBlendConstants: TvkCmdSetBlendConstants;
  vkCmdSetDepthBounds: TvkCmdSetDepthBounds;
  vkCmdSetStencilCompareMask: TvkCmdSetStencilCompareMask;
  vkCmdSetStencilWriteMask: TvkCmdSetStencilWriteMask;
  vkCmdSetStencilReference: TvkCmdSetStencilReference;
  vkCmdBindDescriptorSets: TvkCmdBindDescriptorSets;
  vkCmdBindIndexBuffer: TvkCmdBindIndexBuffer;
  vkCmdBindVertexBuffers: TvkCmdBindVertexBuffers;
  vkCmdDraw: TvkCmdDraw;
  vkCmdDrawIndexed: TvkCmdDrawIndexed;
  vkCmdDrawIndirect: TvkCmdDrawIndirect;
  vkCmdDrawIndexedIndirect: TvkCmdDrawIndexedIndirect;
  vkCmdDispatch: TvkCmdDispatch;
  vkCmdDispatchIndirect: TvkCmdDispatchIndirect;
  vkCmdCopyBuffer: TvkCmdCopyBuffer;
  vkCmdCopyImage: TvkCmdCopyImage;
  vkCmdBlitImage: TvkCmdBlitImage;
  vkCmdCopyBufferToImage: TvkCmdCopyBufferToImage;
  vkCmdCopyImageToBuffer: TvkCmdCopyImageToBuffer;
  vkCmdUpdateBuffer: TvkCmdUpdateBuffer;
  vkCmdFillBuffer: TvkCmdFillBuffer;
  vkCmdClearColorImage: TvkCmdClearColorImage;
  vkCmdClearDepthStencilImage: TvkCmdClearDepthStencilImage;
  vkCmdClearAttachments: TvkCmdClearAttachments;
  vkCmdResolveImage: TvkCmdResolveImage;
  vkCmdSetEvent: TvkCmdSetEvent;
  vkCmdResetEvent: TvkCmdResetEvent;
  vkCmdWaitEvents: TvkCmdWaitEvents;
  vkCmdPipelineBarrier: TvkCmdPipelineBarrier;
  vkCmdBeginQuery: TvkCmdBeginQuery;
  vkCmdEndQuery: TvkCmdEndQuery;
  vkCmdResetQueryPool: TvkCmdResetQueryPool;
  vkCmdWriteTimestamp: TvkCmdWriteTimestamp;
  vkCmdCopyQueryPoolResults: TvkCmdCopyQueryPoolResults;
  vkCmdPushConstants: TvkCmdPushConstants;
  vkCmdBeginRenderPass: TvkCmdBeginRenderPass;
  vkCmdNextSubpass: TvkCmdNextSubpass;
  vkCmdEndRenderPass: TvkCmdEndRenderPass;
  vkCmdExecuteCommands: TvkCmdExecuteCommands;
{$ENDIF}

const
  VK_KHR_surface = 1;

type
  PPVkSurfaceKHR = ^PVkSurfaceKHR;
  PVkSurfaceKHR = ^TVkSurfaceKHR;
  TVkSurfaceKHR = TVkUInt64;

const
  VK_KHR_SURFACE_SPEC_VERSION       = 25;
  VK_KHR_SURFACE_EXTENSION_NAME: PVkChar = 'VK_KHR_surface';

type

  PVkColorSpaceKHR = ^TVkColorSpaceKHR;
  TVkColorSpaceKHR = (
    VK_COLORSPACE_SRGB_NONLINEAR_KHR = 0,
    VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104001,
    VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT = 1000104002,
    VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = 1000104003,
    VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104004,
    VK_COLOR_SPACE_BT709_LINEAR_EXT = 1000104005,
    VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104006,
    VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104007,
    VK_COLOR_SPACE_HDR10_ST2084_EXT = 1000104008,
    VK_COLOR_SPACE_DOLBYVISION_EXT = 1000104009,
    VK_COLOR_SPACE_HDR10_HLG_EXT = 1000104010,
    VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011,
    VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012,
    VK_COLOR_SPACE_PASS_THROUGH_EXT = 1000104013,
    VK_COLORSPACE_BEGIN_RANGE_KHR = VK_COLORSPACE_SRGB_NONLINEAR_KHR,
    VK_COLORSPACE_END_RANGE_KHR = VK_COLORSPACE_SRGB_NONLINEAR_KHR,
    VK_COLORSPACE_RANGE_SIZE_KHR = (VK_COLORSPACE_SRGB_NONLINEAR_KHR - VK_COLORSPACE_SRGB_NONLINEAR_KHR + 1),
    VK_COLORSPACE_MAX_ENUM_KHR = $7FFFFFFF
  );

  PVkPresentModeKHR = ^TVkPresentModeKHR;
  TVkPresentModeKHR = (
    VK_PRESENT_MODE_IMMEDIATE_KHR = 0,
    VK_PRESENT_MODE_MAILBOX_KHR = 1,
    VK_PRESENT_MODE_FIFO_KHR = 2,
    VK_PRESENT_MODE_FIFO_RELAXED_KHR = 3,
    VK_PRESENT_MODE_BEGIN_RANGE_KHR = VK_PRESENT_MODE_IMMEDIATE_KHR,
    VK_PRESENT_MODE_END_RANGE_KHR = VK_PRESENT_MODE_FIFO_RELAXED_KHR,
    VK_PRESENT_MODE_RANGE_SIZE_KHR = (VK_PRESENT_MODE_FIFO_RELAXED_KHR - VK_PRESENT_MODE_IMMEDIATE_KHR + 1),
    VK_PRESENT_MODE_MAX_ENUM_KHR = $7FFFFFFF
  );

  PVkSurfaceTransformFlagBitsKHR = ^TVkSurfaceTransformFlagBitsKHR;
  TVkSurfaceTransformFlagBitsKHR = (
    VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = $00000001,
    VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = $00000002,
    VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = $00000004,
    VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = $00000008,
    VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = $00000010,
    VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = $00000020,
    VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = $00000040,
    VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = $00000080,
    VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = $00000100
  );

  PVkSurfaceTransformFlagsKHR = ^TVkSurfaceTransformFlagsKHR;
  TVkSurfaceTransformFlagsKHR = TVkFlags;

  PVkCompositeAlphaFlagBitsKHR = ^TVkCompositeAlphaFlagBitsKHR;
  TVkCompositeAlphaFlagBitsKHR = (
    VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = $00000001,
    VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = $00000002,
    VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = $00000004,
    VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = $00000008
  );

  PVkCompositeAlphaFlagsKHR = ^TVkCompositeAlphaFlagsKHR;
  TVkCompositeAlphaFlagsKHR = TVkFlags;

  PVkSurfaceCapabilitiesKHR = ^TVkSurfaceCapabilitiesKHR;  TVkSurfaceCapabilitiesKHR = record
    minImageCount: Uint32;
    maxImageCount: Uint32;
    currentExtent: TVkExtent2D;
    minImageExtent: TVkExtent2D;
    maxImageExtent: TVkExtent2D;
    maxImageArrayLayers: Uint32;
    supportedTransforms: TVkSurfaceTransformFlagsKHR;
    currentTransform: TVkSurfaceTransformFlagBitsKHR;
    supportedCompositeAlpha: TVkCompositeAlphaFlagsKHR;
    supportedUsageFlags: TVkImageUsageFlags;
  end;

  PVkSurfaceFormatKHR = ^TVkSurfaceFormatKHR;
  TVkSurfaceFormatKHR = record
    format: TVkFormat;
    colorSpace: TVkColorSpaceKHR;
  end;

  TvkDestroySurfaceKHR = procedure (
                                instance: TVkInstance;
                                surface: TVkSurfaceKHR;
                                const pAllocator: PVkAllocationCallbacks); 
								 stdcall;

  TvkGetPhysicalDeviceSurfaceSupportKHR = function (
                                physicalDevice: TVkPhysicalDevice;
                                queueFamilyIndex: Uint32;
                                surface: TVkSurfaceKHR;
                                pSupported: PVkBool32): TVkResult; 
								 stdcall;

  TvkGetPhysicalDeviceSurfaceCapabilitiesKHR = function (
                                physicalDevice: TVkPhysicalDevice;
                                surface: TVkSurfaceKHR;
                                pSurfaceCapabilities: PVkSurfaceCapabilitiesKHR): TVkResult; 
								 stdcall;

  TvkGetPhysicalDeviceSurfaceFormatsKHR = function (
                                physicalDevice: TVkPhysicalDevice;
                                surface: TVkSurfaceKHR;
                                pSurfaceFormatCount: PVKuint32;
                                pSurfaceFormats: PVkSurfaceFormatKHR): TVkResult; 
								 stdcall;

  TvkGetPhysicalDeviceSurfacePresentModesKHR = function (
                                physicalDevice: TVkPhysicalDevice;
                                surface: TVkSurfaceKHR;
                                pPresentModeCount: PVKuint32;
                                pPresentModes: PVkPresentModeKHR): TVkResult;
								 stdcall;

{$IFNDEF VK_NO_PROTOTYPES}
var
  vkDestroySurfaceKHR: TvkDestroySurfaceKHR;
  vkGetPhysicalDeviceSurfaceSupportKHR: TvkGetPhysicalDeviceSurfaceSupportKHR;
  vkGetPhysicalDeviceSurfaceCapabilitiesKHR: TvkGetPhysicalDeviceSurfaceCapabilitiesKHR;
  vkGetPhysicalDeviceSurfaceFormatsKHR: TvkGetPhysicalDeviceSurfaceFormatsKHR;
  vkGetPhysicalDeviceSurfacePresentModesKHR: TvkGetPhysicalDeviceSurfacePresentModesKHR;
{$ENDIF}

const
  VK_KHR_swapchain = 1;

type
  PPVkSwapchainKHR = ^PVkSwapchainKHR;
  PVkSwapchainKHR = ^TVkSwapchainKHR;
  TVkSwapchainKHR = TVkUInt64;

const
  VK_KHR_SWAPCHAIN_SPEC_VERSION     = 68;
  VK_KHR_SWAPCHAIN_EXTENSION_NAME: PVkChar = 'VK_KHR_swapchain';

type  PVkSwapchainCreateFlagsKHR = ^TVkSwapchainCreateFlagsKHR;
  TVkSwapchainCreateFlagsKHR = TVkFlags;

  PVkSwapchainCreateInfoKHR = ^TVkSwapchainCreateInfoKHR;
  TVkSwapchainCreateInfoKHR = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkSwapchainCreateFlagsKHR;
    surface: TVkSurfaceKHR;
    minImageCount: Uint32;
    imageFormat: TVkFormat;
    imageColorSpace: TVkColorSpaceKHR;
    imageExtent: TVkExtent2D;
    imageArrayLayers: Uint32;
    imageUsage: TVkImageUsageFlags;
    imageSharingMode: TVkSharingMode;
    queueFamilyIndexCount: Uint32;
    pQueueFamilyIndices: PVKuint32;
    preTransform: TVkSurfaceTransformFlagBitsKHR;
    compositeAlpha: TVkCompositeAlphaFlagBitsKHR;
    presentMode: TVkPresentModeKHR;
    clipped: TVkBool32;
    oldSwapchain: TVkSwapchainKHR;
  end;

  PVkPresentInfoKHR = ^TVkPresentInfoKHR;
  TVkPresentInfoKHR = record
    sType: TVkStructureType;
    pNext: Pointer;
    waitSemaphoreCount: Uint32;
    pWaitSemaphores: PVkSemaphore;
    swapchainCount: Uint32;
    pSwapchains: PVkSwapchainKHR;
    pImageIndices: PVKuint32;
    pResults: PVkResult;
  end;

  TvkCreateSwapchainKHR = function (
                                device: TVkDevice;
                                const pCreateInfo: PVkSwapchainCreateInfoKHR;
                                const pAllocator: PVkAllocationCallbacks;
                                pSwapchain: PVkSwapchainKHR): TVkResult;
                								 stdcall;
  TvkDestroySwapchainKHR = procedure (
                                device: TVkDevice;
                                swapchain: TVkSwapchainKHR;
                                const pAllocator: PVkAllocationCallbacks);
								                 stdcall;

  TvkGetSwapchainImagesKHR = function (
                                device: TVkDevice;
                                swapchain: TVkSwapchainKHR;
                                pSwapchainImageCount: PVKuint32;
                                pSwapchainImages: PVkImage): TVkResult;
                								 stdcall;

  TvkAcquireNextImageKHR = function (
      device: TVkDevice;
      swapchain: TVkSwapchainKHR;
      timeout: TVKUInt64;
      semaphore: TVkSemaphore;
      fence: TVkFence;
      pImageIndex: PVKuint32): TVkResult;
	   stdcall;

  TvkQueuePresentKHR = function (
      queue: TVkQueue;
      const pPresentInfo: PVkPresentInfoKHR): TVkResult;
       stdcall;

{$IFNDEF VK_NO_PROTOTYPES}
var
  vkCreateSwapchainKHR: TvkCreateSwapchainKHR;
  vkDestroySwapchainKHR: TvkDestroySwapchainKHR;
  vkGetSwapchainImagesKHR: TvkGetSwapchainImagesKHR;
  vkAcquireNextImageKHR: TvkAcquireNextImageKHR;
  vkQueuePresentKHR: TvkQueuePresentKHR;
{$ENDIF}

const
   VK_KHR_display = 1;
type
  PPVkDisplayKHR = ^PVkDisplayKHR;
  PVkDisplayKHR = ^TVkDisplayKHR;
  TVkDisplayKHR = TVkUint64;

  PPVkDisplayModeKHR = ^PVkDisplayModeKHR;
  PVkDisplayModeKHR = ^TVkDisplayModeKHR;
  TVkDisplayModeKHR = TVkUint64;

const
  VK_KHR_DISPLAY_SPEC_VERSION       = 21;
  VK_KHR_DISPLAY_EXTENSION_NAME: PVkChar = 'VK_KHR_display';


type  PVkDisplayPlaneAlphaFlagBitsKHR = ^TVkDisplayPlaneAlphaFlagBitsKHR;
  TVkDisplayPlaneAlphaFlagBitsKHR = (
    VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = $00000001,
    VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = $00000002,
    VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = $00000004,
    VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = $00000008,
    VK_DISPLAY_PLANE_ALPHA_FLAG_BITS_MAX_ENUM_KHR = $7FFFFFFF
  );

  PVkDisplayModeCreateFlagsKHR = ^TVkDisplayModeCreateFlagsKHR;
  TVkDisplayModeCreateFlagsKHR = TVkFlags;

  PVkDisplayPlaneAlphaFlagsKHR = ^TVkDisplayPlaneAlphaFlagsKHR;
  TVkDisplayPlaneAlphaFlagsKHR = TVkFlags;

  PVkDisplaySurfaceCreateFlagsKHR = ^TVkDisplaySurfaceCreateFlagsKHR;
  TVkDisplaySurfaceCreateFlagsKHR = TVkFlags;
  PVkDisplayPropertiesKHR = ^TVkDisplayPropertiesKHR;
  TVkDisplayPropertiesKHR = record
    display: TVkDisplayKHR;
    displayName: PVkChar;
    physicalDimensions: TVkExtent2D;
    physicalResolution: TVkExtent2D;
    supportedTransforms: TVkSurfaceTransformFlagsKHR;
    planeReorderPossible: TVkBool32;
    persistentContent: TVkBool32;
  end;

  PVkDisplayModeParametersKHR = ^TVkDisplayModeParametersKHR;
  TVkDisplayModeParametersKHR = record
    visibleRegion: TVkExtent2D;
    refreshRate: Uint32;
  end;

  PVkDisplayModePropertiesKHR = ^TVkDisplayModePropertiesKHR;
  TVkDisplayModePropertiesKHR = record
    displayMode: TVkDisplayModeKHR;
    parameters: TVkDisplayModeParametersKHR;
  end;

  PVkDisplayModeCreateInfoKHR = ^TVkDisplayModeCreateInfoKHR;
  TVkDisplayModeCreateInfoKHR = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkDisplayModeCreateFlagsKHR;
    parameters: TVkDisplayModeParametersKHR;
  end;

  PVkDisplayPlaneCapabilitiesKHR = ^TVkDisplayPlaneCapabilitiesKHR;
  TVkDisplayPlaneCapabilitiesKHR = record
    supportedAlpha: TVkDisplayPlaneAlphaFlagsKHR;
    minSrcPosition: TVkOffset2D;
    maxSrcPosition: TVkOffset2D;
    minSrcExtent: TVkExtent2D;
    maxSrcExtent: TVkExtent2D;
    minDstPosition: TVkOffset2D;
    maxDstPosition: TVkOffset2D;
    minDstExtent: TVkExtent2D;
    maxDstExtent: TVkExtent2D;
  end;

  PVkDisplayPlanePropertiesKHR = ^TVkDisplayPlanePropertiesKHR;
  TVkDisplayPlanePropertiesKHR = record
    currentDisplay: TVkDisplayKHR;
    currentStackIndex: Uint32;
  end;

  PVkDisplaySurfaceCreateInfoKHR = ^TVkDisplaySurfaceCreateInfoKHR;
  TVkDisplaySurfaceCreateInfoKHR = record
    sType: 					TVkStructureType;
    pNext: 					Pointer;
    flags: 					TVkDisplaySurfaceCreateFlagsKHR;
    displayMode: 			TVkDisplayModeKHR;
    planeIndex: 			Uint32;
    planeStackIndex: 		Uint32;
    transform: 				TVkSurfaceTransformFlagBitsKHR;
    globalAlpha: 			Single;
    alphaMode: 				TVkDisplayPlaneAlphaFlagBitsKHR;
    imageExtent: 			TVkExtent2D;
  end;

  TvkGetPhysicalDeviceDisplayPropertiesKHR = function (
                                physicalDevice: TVkPhysicalDevice;
                                pPropertyCount: PVKuint32;
                                pProperties: PVkDisplayPropertiesKHR): TVkResult; 
                				 stdcall;

  TvkGetPhysicalDeviceDisplayPlanePropertiesKHR = function (
                                physicalDevice: TVkPhysicalDevice;
                                pPropertyCount: PVKuint32;
                                pProperties: PVkDisplayPlanePropertiesKHR): TVkResult;
								 stdcall;

  TvkGetDisplayPlaneSupportedDisplaysKHR = function (
                                physicalDevice: TVkPhysicalDevice;
                                planeIndex: Uint32;
                                pDisplayCount: PVKuint32;
                                pDisplays: PVkDisplayKHR): TVkResult;
                				 stdcall;

  TvkGetDisplayModePropertiesKHR = function (
                                physicalDevice: TVkPhysicalDevice;
                                display: TVkDisplayKHR;
                                pPropertyCount: PVKuint32;
                                pProperties: PVkDisplayModePropertiesKHR
                                ): TVkResult;
								 stdcall;

  TvkCreateDisplayModeKHR = function (
                                physicalDevice: TVkPhysicalDevice;
                                display: TVkDisplayKHR;
                                const pCreateInfo: PVkDisplayModeCreateInfoKHR;
                                const pAllocator: PVkAllocationCallbacks;
                                pMode: PVkDisplayModeKHR): TVkResult; 
							     stdcall;

  TvkGetDisplayPlaneCapabilitiesKHR = function (
                                physicalDevice: TVkPhysicalDevice;
                                mode: TVkDisplayModeKHR;
                                planeIndex: Uint32;
                                pCapabilities: PVkDisplayPlaneCapabilitiesKHR): TVkResult;
                				 stdcall;

  TvkCreateDisplayPlaneSurfaceKHR = function (
                                instance: TVkInstance;
                                const pCreateInfo: PVkDisplaySurfaceCreateInfoKHR;
                                const pAllocator: PVkAllocationCallbacks;
                                pSurface: PVkSurfaceKHR): TVkResult;
								 stdcall;

{$IFNDEF VK_NO_PROTOTYPES}
var
  vkGetPhysicalDeviceDisplayPropertiesKHR: TvkGetPhysicalDeviceDisplayPropertiesKHR;
  vkGetPhysicalDeviceDisplayPlanePropertiesKHR: TvkGetPhysicalDeviceDisplayPlanePropertiesKHR;
  vkGetDisplayPlaneSupportedDisplaysKHR: TvkGetDisplayPlaneSupportedDisplaysKHR;
  vkGetDisplayModePropertiesKHR: TvkGetDisplayModePropertiesKHR;
  vkCreateDisplayModeKHR: TvkCreateDisplayModeKHR;
  vkGetDisplayPlaneCapabilitiesKHR: TvkGetDisplayPlaneCapabilitiesKHR;
  vkCreateDisplayPlaneSurfaceKHR: TvkCreateDisplayPlaneSurfaceKHR;
{$ENDIF}

const
  VK_KHR_display_swapchain = 1;
  VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION = 9;
  VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME: PVkChar = 'VK_KHR_display_swapchain';


type

  PVkDisplayPresentInfoKHR = ^TVkDisplayPresentInfoKHR;
  TVkDisplayPresentInfoKHR = record
    sType: TVkStructureType;
    pNext: Pointer;
    srcRect: TVkRect2D;
    dstRect: TVkRect2D;
    persistent: TVkBool32;
  end;

  TvkCreateSharedSwapchainsKHR = function (
      device: TVkDevice;
      swapchainCount: Uint32;
      const pCreateInfos: PVkSwapchainCreateInfoKHR;
      const pAllocator: PVkAllocationCallbacks;
      pSwapchains: PVkSwapchainKHR): TVkResult; 
	   stdcall;

{$IFNDEF VK_NO_PROTOTYPES}
var
  vkCreateSharedSwapchainsKHR: TvkCreateSharedSwapchainsKHR;
{$ENDIF}

{$IFDEF VK_USE_PLATFORM_XLIB_KHR}
//#define VK_KHR_xlib_surface 1
//#include <X11/Xlib.h>

const
  VK_KHR_XLIB_SURFACE_SPEC_VERSION  = 6;
  VK_KHR_XLIB_SURFACE_EXTENSION_NAME: PVkChar = 'VK_KHR_xlib_surface';

type

  PVkXlibSurfaceCreateFlagsKHR = ^TVkXlibSurfaceCreateFlagsKHR;
  TVkXlibSurfaceCreateFlagsKHR = TVkFlags;

  PVkXlibSurfaceCreateInfoKHR = ^TVkXlibSurfaceCreateInfoKHR;
  TVkXlibSurfaceCreateInfoKHR = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkXlibSurfaceCreateFlagsKHR;
    dpy: PDisplay;
    window: TWindow;
  end;


  TvkCreateXlibSurfaceKHR = function (
      instance: TVkInstance;
      const pCreateInfo: PVkXlibSurfaceCreateInfoKHR;
      const pAllocator: PVkAllocationCallbacks;
      pSurface: PVkSurfaceKHR): TVkResult; 
	   stdcall;

  TvkGetPhysicalDeviceXlibPresentationSupportKHR = function (
        physicalDevice: TVkPhysicalDevice;
        queueFamilyIndex: Uint32;
        dpy: PDisplay;
        visualID: TVisualID): TVkBool32; 
		 stdcall;

{$IFNDEF VK_NO_PROTOTYPES}
var
  vkCreateXlibSurfaceKHR: TvkCreateXlibSurfaceKHR;
  vkGetPhysicalDeviceXlibPresentationSupportKHR: TvkGetPhysicalDeviceXlibPresentationSupportKHR;
{$ENDIF}
{$ENDIF} //* VK_USE_PLATFORM_XLIB_KHR */

{$IFDEF VK_USE_PLATFORM_XCB_KHR}
//#define VK_KHR_xcb_surface 1
//#include <xcb/xcb.h>

const
  VK_KHR_XCB_SURFACE_SPEC_VERSION = 6;
  VK_KHR_XCB_SURFACE_EXTENSION_NAME: PVkChar = 'VK_KHR_xcb_surface';

type  TVkXcbSurfaceCreateFlagsKHR = ^TVkXcbSurfaceCreateFlagsKHR;
  TVkXcbSurfaceCreateFlagsKHR = TVkFlags;

  PVkXcbSurfaceCreateInfoKHR = ^TVkXcbSurfaceCreateInfoKHR;
  TVkXcbSurfaceCreateInfoKHR = record
    sType: 					TVkStructureType;
    pNext: 					Pointer;
    flags: 					TVkXcbSurfaceCreateFlagsKHR;
    connection: 			Pxcb_connection_t;
    window: 				Txcb_window_t;
  end;


  TvkCreateXcbSurfaceKHR = function (
      instance: TVkInstance;
      const pCreateInfo: PVkXcbSurfaceCreateInfoKHR;
      const pAllocator: PVkAllocationCallbacks;
      pSurface: PVkSurfaceKHR): TVkResult; 
	   stdcall;

  TvkGetPhysicalDeviceXcbPresentationSupportKHR = function (
      physicalDevice: TVkPhysicalDevice;
      queueFamilyIndex: Uint32;
      connection: Pxcb_connection_t;
      visual_id: xcb_visualid_t): TVkBool32; 
	  stdcall;

{$IFDEF VK_NO_PROTOTYPES}
var
  vkCreateXcbSurfaceKHR: TvkCreateXcbSurfaceKHR;
  vkGetPhysicalDeviceXcbPresentationSupportKHR: TvkGetPhysicalDeviceXcbPresentationSupportKHR;
{$ENDIF}
{$ENDIF} //* VK_USE_PLATFORM_XCB_KHR */

{$IFDEF VK_USE_PLATFORM_WAYLAND_KHR}
const
  VK_KHR_wayland_surface = 1;
//#include <wayland-client.h>

const
  VK_KHR_WAYLAND_SURFACE_SPEC_VERSION = 5;
  VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME: PVkChar = 'VK_KHR_wayland_surface';

type  PVkWaylandSurfaceCreateFlagsKHR = ^TVkWaylandSurfaceCreateFlagsKHR;
  TVkWaylandSurfaceCreateFlagsKHR = TVkFlags;

  PVkWaylandSurfaceCreateInfoKHR = ^TVkWaylandSurfaceCreateInfoKHR;
  TVkWaylandSurfaceCreateInfoKHR = record
    sType: 					TVkStructureType;
    pNext: 					Pointer;
    flags: 					TVkWaylandSurfaceCreateFlagsKHR;
    display: 				Pwl_display;
    surface: 				Pwl_surface;
  end;


  TvkCreateWaylandSurfaceKHR = function (
        instance: TVkInstance;
        const pCreateInfo: PVkWaylandSurfaceCreateInfoKHR;
        const pAllocator: PVkAllocationCallbacks;
        pSurface: PVkSurfaceKHR): TVkResult; 
		 stdcall;

  TvkGetPhysicalDeviceWaylandPresentationSupportKHR = function (
        physicalDevice: TVkPhysicalDevice;
        queueFamilyIndex: Uint32;
        display: Pwl_display): TVkBool32; 
		 stdcall;

{$IFNDEF VK_NO_PROTOTYPES}
var
  vkCreateWaylandSurfaceKHR: TvkCreateWaylandSurfaceKHR;
  vkGetPhysicalDeviceWaylandPresentationSupportKHR: TvkGetPhysicalDeviceWaylandPresentationSupportKHR;
{$ENDIF}
{$ENDIF} //* VK_USE_PLATFORM_WAYLAND_KHR */

{$IFDEF VK_USE_PLATFORM_MIR_KHR}
const
  VK_KHR_mir_surface = 1;
//#include <mir_toolkit/client_types.h>

const
  VK_KHR_MIR_SURFACE_SPEC_VERSION   = 4;
  VK_KHR_MIR_SURFACE_EXTENSION_NAME: PVkChar = 'VK_KHR_mir_surface';

type  PVkMirSurfaceCreateFlagsKHR = ^TVkMirSurfaceCreateFlagsKHR;
  TVkMirSurfaceCreateFlagsKHR = TVkFlags;

  PVkMirSurfaceCreateInfoKHR = ^TVkMirSurfaceCreateInfoKHR;
  TVkMirSurfaceCreateInfoKHR = record
    sType: 					TVkStructureType;
    pNext: 					Pointer;
    flags: 					TVkMirSurfaceCreateFlagsKHR;
    connection: 			PMirConnection;
    mirSurface: 			PMirSurface;
  end;


  TvkCreateMirSurfaceKHR = function (
          instance: TVkInstance;
          const pCreateInfo: PVkMirSurfaceCreateInfoKHR;
          const pAllocator: PVkAllocationCallbacks;
          pSurface: PVkSurfaceKHR): TVkResult;
			 stdcall;

  TvkGetPhysicalDeviceMirPresentationSupportKHR = function (
        physicalDevice: TVkPhysicalDevice;
        queueFamilyIndex: Uint32;
        connection: PMirConnection): TVkBool32;
			 stdcall;

{$IFNDEF VK_NO_PROTOTYPES}
var
  vkCreateMirSurfaceKHR: TvkCreateMirSurfaceKHR;
  vkGetPhysicalDeviceMirPresentationSupportKHR: TvkGetPhysicalDeviceMirPresentationSupportKHR;
{$ENDIF}
{$ENDIF} //* VK_USE_PLATFORM_MIR_KHR */

{$IFDEF VK_USE_PLATFORM_ANDROID_KHR}
const
  VK_KHR_android_surface = 1;
//#include <android/native_window.h>

const
  VK_KHR_ANDROID_SURFACE_SPEC_VERSION = 6;
  VK_KHR_ANDROID_SURFACE_EXTENSION_NAME: PVkChar = 'VK_KHR_android_surface';

type  PVkAndroidSurfaceCreateFlagsKHR = ^TVkAndroidSurfaceCreateFlagsKHR;
  TVkAndroidSurfaceCreateFlagsKHR = TVkFlags;

  PVkAndroidSurfaceCreateInfoKHR = ^TVkAndroidSurfaceCreateInfoKHR;
  TVkAndroidSurfaceCreateInfoKHR = record
    sType: TVkStructureType;
    pNext: Pointer;
    flags: TVkAndroidSurfaceCreateFlagsKHR;
    window: PANativeWindow;
  end;


  TvkCreateAndroidSurfaceKHR = function (
       instance: TVkInstance;
       const pCreateInfo: PVkAndroidSurfaceCreateInfoKHR;
       const pAllocator: PVkAllocationCallbacks;
       pSurface: PVkSurfaceKHR): TVkBool32;
     stdcall;

{$IFNDEF VK_NO_PROTOTYPES}
var
  vkCreateAndroidSurfaceKHR: TvkCreateAndroidSurfaceKHR;
{$ENDIF}
{$ENDIF} //* VK_USE_PLATFORM_ANDROID_KHR */

{$IFDEF VK_USE_PLATFORM_WIN32_KHR}
//#define VK_KHR_win32_surface 1
//#include <windows.h>

const
  VK_KHR_WIN32_SURFACE_SPEC_VERSION = 5;
  VK_KHR_WIN32_SURFACE_EXTENSION_NAME: PVkChar = 'VK_KHR_win32_surface';

type  PVkWin32SurfaceCreateFlagsKHR = ^TVkWin32SurfaceCreateFlagsKHR;
  TVkWin32SurfaceCreateFlagsKHR = TVkFlags;

  PVkWin32SurfaceCreateInfoKHR = ^TVkWin32SurfaceCreateInfoKHR;
  TVkWin32SurfaceCreateInfoKHR = record
    sType: 					TVkStructureType;
    pNext: 					Pointer;
    flags: 					TVkWin32SurfaceCreateFlagsKHR;
    hinstance: 				HINST;
    hwnd: 					HWND;
  end;

  TvkCreateWin32SurfaceKHR = function (
                                instance: TVkInstance;
                                const pCreateInfo: PVkWin32SurfaceCreateInfoKHR;
                                const pAllocator: PVkAllocationCallbacks;
                                pSurface: PVkSurfaceKHR): TVkResult; 
								 stdcall;

  TvkGetPhysicalDeviceWin32PresentationSupportKHR = function (
                                physicalDevice: TVkPhysicalDevice;
                                queueFamilyIndex: Uint32): TVkBool32;
								 stdcall;

{$IFNDEF VK_NO_PROTOTYPES}
var
  vkCreateWin32SurfaceKHR: TvkCreateWin32SurfaceKHR;
  vkGetPhysicalDeviceWin32PresentationSupportKHR: TvkGetPhysicalDeviceWin32PresentationSupportKHR;
{$ENDIF}
{$ENDIF} //* VK_USE_PLATFORM_WIN32_KHR */

const
  VK_EXT_debug_report = 1;

type
  PPVkDebugReportCallbackEXT = ^PVkDebugReportCallbackEXT;
  PVkDebugReportCallbackEXT = ^TVkDebugReportCallbackEXT;
  TVkDebugReportCallbackEXT = TVkUInt64;

const
  VK_EXT_DEBUG_REPORT_SPEC_VERSION  = 6;
  VK_EXT_DEBUG_REPORT_EXTENSION_NAME: PVkChar = 'VK_EXT_debug_report';
  VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT;

type
  PVkDebugReportObjectTypeEXT = ^TVkDebugReportObjectTypeEXT;
  TVkDebugReportObjectTypeEXT = (
    VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0,
    VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1,
    VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2,
    VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3,
    VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4,
    VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5,
    VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6,
    VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7,
    VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8,
    VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9,
    VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10,
    VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11,
    VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12,
    VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13,
    VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14,
    VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15,
    VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16,
    VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17,
    VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18,
    VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19,
    VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20,
    VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21,
    VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22,
    VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23,
    VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24,
    VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25,
    VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26,
    VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27,
    VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28,
    VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29,
    VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30,
    VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31,
    VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32,
    VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT = 1000085000,
    VK_DEBUG_REPORT_OBJECT_TYPE_BEGIN_RANGE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT,
    VK_DEBUG_REPORT_OBJECT_TYPE_END_RANGE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT,
    VK_DEBUG_REPORT_OBJECT_TYPE_RANGE_SIZE_EXT = (VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT - VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT + 1),
    VK_DEBUG_REPORT_OBJECT_TYPE_MAX_ENUM_EXT = $7FFFFFFF
	  );

  PVkDebugReportErrorEXT = ^TVkDebugReportErrorEXT;
  TVkDebugReportErrorEXT = (
    VK_DEBUG_REPORT_ERROR_NONE_EXT = 0,
    VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT = 1,
    VK_DEBUG_REPORT_ERROR_BEGIN_RANGE_EXT = VK_DEBUG_REPORT_ERROR_NONE_EXT,
    VK_DEBUG_REPORT_ERROR_END_RANGE_EXT = VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT,
    VK_DEBUG_REPORT_ERROR_RANGE_SIZE_EXT = (VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT - VK_DEBUG_REPORT_ERROR_NONE_EXT + 1),
    VK_DEBUG_REPORT_ERROR_MAX_ENUM_EXT = $7FFFFFFF
    );

  PVkDebugReportFlagBitsEXT = ^TVkDebugReportFlagBitsEXT;
  TVkDebugReportFlagBitsEXT = (
    VK_DEBUG_REPORT_INFORMATION_BIT_EXT = $00000001,
    VK_DEBUG_REPORT_WARNING_BIT_EXT = $00000002,
    VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = $00000004,
    VK_DEBUG_REPORT_ERROR_BIT_EXT = $00000008,
    VK_DEBUG_REPORT_DEBUG_BIT_EXT = $00000010,
    VK_DEBUG_REPORT_FLAG_BITS_MAX_ENUM_EXT = $7FFFFFFF
  );

  PVkDebugReportFlagsEXT = ^TVkDebugReportFlagsEXT;
  TVkDebugReportFlagsEXT = TVkFlags;

  TvkDebugReportCallback_f_EXT = function (
      flags: 				TVkDebugReportFlagsEXT;
      objectType: 			TVkDebugReportObjectTypeEXT;
      object_: 				TVKUInt64;
      location: 			TVKsize;
      messageCode: 			TVKInt32;
      pLayerPrefix: 		PVkChar;
      pMessage: 			PVkChar;
      pUserData: Pointer): 	TVkBool32; stdcall;

  PVkDebugReportCallbackCreateInfoEXT = ^TVkDebugReportCallbackCreateInfoEXT;  TVkDebugReportCallbackCreateInfoEXT = record
    sType: 					TVkStructureType;
    pNext: 					Pointer;
    flags: 					TVkDebugReportFlagsEXT;
    pfnCallback: 			TvkDebugReportCallbackEXT;
    pUserData: 				Pointer;
  end;


  TvkCreateDebugReportCallbackEXT = function (
     instance: TVkInstance;
     const pCreateInfo: PVkDebugReportCallbackCreateInfoEXT;
     const pAllocator: PVkAllocationCallbacks;
     pCallback: PVkDebugReportCallbackEXT): TVkResult; stdcall;

  TvkDestroyDebugReportCallbackEXT = procedure (
     instance: TVkInstance;
     callback: TVkDebugReportCallbackEXT;
     const pAllocator: PVkAllocationCallbacks); stdcall;

  TvkDebugReportMessageEXT = procedure (
     instance: TVkInstance;
     flags: TVkDebugReportFlagsEXT;
     objectType: TVkDebugReportObjectTypeEXT;
     object_: TVKUInt64;
     location: TVKsize;
     messageCode: TVKInt32;
     pLayerPrefix: PVkChar;
     pMessage: PVkChar); stdcall;

{$IFNDEF VK_NO_PROTOTYPES}
var
  vkCreateDebugReportCallbackEXT: TvkCreateDebugReportCallbackEXT;
  vkDestroyDebugReportCallbackEXT: TvkDestroyDebugReportCallbackEXT;
  vkDebugReportMessageEXT: TvkDebugReportMessageEXT;
{$ENDIF}

function GetProcAddressVulkan(ProcName: PVkChar; LibHandle: Pointer = nil): Pointer;
function IsInitVulkan(LibName: String = LIBNAME_VULKAN): Boolean;

{$IFNDEF VK_NO_PROTOTYPES}
var
  LibHandleVulkan: Pointer = nil;
{$ENDIF}

var
  LibName: PWideChar;



//=====================================================================================
implementation
//=====================================================================================
function VK_MAKE_VERSION(const major, minor, patch: Integer): Integer;
begin
  Result := (((major) shl 22) or ((minor) shl 12) or (patch));
end;

function VK_API_VERSION(): Integer;
begin
  Result := VK_MAKE_VERSION(1, 0, 5);
end;

function VK_VERSION_MAJOR(version: Cardinal): Integer;
begin
  Result := version shr 22;
end;

function VK_VERSION_MINOR(version: Cardinal): Integer;
begin
  Result := ((version shr 12) and $3ff);
end;

function VK_VERSION_PATCH(version: Cardinal): Integer;
begin
  Result := (version and $fff);
end;

{$IFDEF LINUX}
const
  RTLD_LAZY = $001;
  RTLD_NOW = $002;
  RTLD_BINDING_MASK = $003;

  LibraryLib = 'libdl.so.2';

  function dlopen(Name: PVkChar; Flags: LongInt): Pointer; cdecl; external LibraryLib name 'dlopen';
  function dlclose(Lib: Pointer): LongInt; cdecl; external LibraryLib name 'dlclose';
  function dlsym(Lib: Pointer; Name: PVkChar): Pointer; cdecl; external LibraryLib name 'dlsym';
{$ENDIF}

function LoadLibraryVulkan(Name: PChar): Pointer;
begin
  {$IFDEF MSWINDOWS}
    Result := Pointer(LoadLibrary(LibName));
  {$ENDIF}

  {$IFDEF LINUX}
    Result := dlopen(Name, RTLD_LAZY);
  {$ENDIF}
end;

function FreeLibraryVulkan(LibHandle: Pointer): Boolean;
begin
  if LibHandle = nil then
    Result := False
  else
  {$IFDEF MSWINDOWS}
    Result := FreeLibrary(HMODULE(LibHandle));
  {$ENDIF}

  {$IFDEF LINUX}
    Result := dlclose(LibHandle) = 0;
  {$ENDIF}
end;

function GetProcAddressVulkan(ProcName: PAnsiChar; LibHandle: Pointer = nil): Pointer;
begin
  if LibHandle = nil then LibHandle := LibHandleVulkan;

  {$IFDEF MSWINDOWS}
    Result := GetProcAddress(HMODULE(LibHandle), ProcName);
  {$ENDIF}

  {$IFDEF LINUX}
    Result := dlsym(LibHandle, ProcName);
  {$ENDIF}
end;


function IsInitVulkan(LibName: String = LIBNAME_VULKAN): Boolean;
begin
  Result := False;


  if LibHandleVulkan <> nil then
    FreeLibraryVulkan(LibHandleVulkan);


  LibHandleVulkan := LoadLibraryVulkan(PChar(LibName));


  if (LibHandleVulkan <> nil) then
  begin
    vkCreateInstance := TvkCreateInstance(GetProcAddressVulkan('vkCreateInstance', LibHandleVulkan));
    vkDestroyInstance := TvkDestroyInstance(GetProcAddressVulkan('vkDestroyInstance', LibHandleVulkan));
    vkEnumeratePhysicalDevices := TvkEnumeratePhysicalDevices(GetProcAddressVulkan('vkEnumeratePhysicalDevices', LibHandleVulkan));
    vkGetPhysicalDeviceFeatures := TvkGetPhysicalDeviceFeatures(GetProcAddressVulkan('vkGetPhysicalDeviceFeatures', LibHandleVulkan));
    vkGetPhysicalDeviceFormatProperties := TvkGetPhysicalDeviceFormatProperties(GetProcAddressVulkan('vkGetPhysicalDeviceFormatProperties', LibHandleVulkan));
    vkGetPhysicalDeviceImageFormatProperties := TvkGetPhysicalDeviceImageFormatProperties(GetProcAddressVulkan('vkGetPhysicalDeviceImageFormatProperties', LibHandleVulkan));
    vkGetPhysicalDeviceProperties := TvkGetPhysicalDeviceProperties(GetProcAddressVulkan('vkGetPhysicalDeviceProperties', LibHandleVulkan));
    vkGetPhysicalDeviceQueueFamilyProperties := TvkGetPhysicalDeviceQueueFamilyProperties(GetProcAddressVulkan('vkGetPhysicalDeviceQueueFamilyProperties', LibHandleVulkan));
    vkGetPhysicalDeviceMemoryProperties := TvkGetPhysicalDeviceMemoryProperties(GetProcAddressVulkan('vkGetPhysicalDeviceMemoryProperties', LibHandleVulkan));
    vkGetInstanceProcAddr := TvkGetInstanceProcAddr(GetProcAddressVulkan('vkGetInstanceProcAddr', LibHandleVulkan));
    vkGetDeviceProcAddr := TvkGetDeviceProcAddr(GetProcAddressVulkan('vkGetDeviceProcAddr', LibHandleVulkan));
    vkCreateDevice := TvkCreateDevice(GetProcAddressVulkan('vkCreateDevice', LibHandleVulkan));
    vkDestroyDevice := TvkDestroyDevice(GetProcAddressVulkan('vkDestroyDevice', LibHandleVulkan));
    vkEnumerateInstanceExtensionProperties := TvkEnumerateInstanceExtensionProperties(GetProcAddressVulkan('vkEnumerateInstanceExtensionProperties', LibHandleVulkan));
    vkEnumerateDeviceExtensionProperties := TvkEnumerateDeviceExtensionProperties(GetProcAddressVulkan('vkEnumerateDeviceExtensionProperties', LibHandleVulkan));
    vkEnumerateInstanceLayerProperties := TvkEnumerateInstanceLayerProperties(GetProcAddressVulkan('vkEnumerateInstanceLayerProperties', LibHandleVulkan));
    vkEnumerateDeviceLayerProperties := TvkEnumerateDeviceLayerProperties(GetProcAddressVulkan('vkEnumerateDeviceLayerProperties', LibHandleVulkan));
    vkGetDeviceQueue := TvkGetDeviceQueue(GetProcAddressVulkan('vkGetDeviceQueue', LibHandleVulkan));
    vkQueueSubmit := TvkQueueSubmit(GetProcAddressVulkan('vkQueueSubmit', LibHandleVulkan));
    vkQueueWaitIdle := TvkQueueWaitIdle(GetProcAddressVulkan('vkQueueWaitIdle', LibHandleVulkan));
    vkDeviceWaitIdle := TvkDeviceWaitIdle(GetProcAddressVulkan('vkDeviceWaitIdle', LibHandleVulkan));
    vkAllocateMemory := TvkAllocateMemory(GetProcAddressVulkan('vkAllocateMemory', LibHandleVulkan));
    vkFreeMemory := TvkFreeMemory(GetProcAddressVulkan('vkFreeMemory', LibHandleVulkan));
    vkMapMemory := TvkMapMemory(GetProcAddressVulkan('vkMapMemory', LibHandleVulkan));
    vkUnmapMemory := TvkUnmapMemory(GetProcAddressVulkan('vkUnmapMemory', LibHandleVulkan));
    vkFlushMappedMemoryRanges := TvkFlushMappedMemoryRanges(GetProcAddressVulkan('vkFlushMappedMemoryRanges', LibHandleVulkan));
    vkInvalidateMappedMemoryRanges := TvkInvalidateMappedMemoryRanges(GetProcAddressVulkan('vkInvalidateMappedMemoryRanges', LibHandleVulkan));
    vkGetDeviceMemoryCommitment := TvkGetDeviceMemoryCommitment(GetProcAddressVulkan('vkGetDeviceMemoryCommitment', LibHandleVulkan));
    vkBindBufferMemory := TvkBindBufferMemory(GetProcAddressVulkan('vkBindBufferMemory', LibHandleVulkan));
    vkBindImageMemory := TvkBindImageMemory(GetProcAddressVulkan('vkBindImageMemory', LibHandleVulkan));
    vkGetBufferMemoryRequirements := TvkGetBufferMemoryRequirements(GetProcAddressVulkan('vkGetBufferMemoryRequirements', LibHandleVulkan));
    vkGetImageMemoryRequirements := TvkGetImageMemoryRequirements(GetProcAddressVulkan('vkGetImageMemoryRequirements', LibHandleVulkan));
    vkGetImageSparseMemoryRequirements := TvkGetImageSparseMemoryRequirements(GetProcAddressVulkan('vkGetImageSparseMemoryRequirements', LibHandleVulkan));
    vkGetPhysicalDeviceSparseImageFormatProperties := TvkGetPhysicalDeviceSparseImageFormatProperties(GetProcAddressVulkan('vkGetPhysicalDeviceSparseImageFormatProperties', LibHandleVulkan));
    vkQueueBindSparse := TvkQueueBindSparse(GetProcAddressVulkan('vkQueueBindSparse', LibHandleVulkan));
    vkCreateFence := TvkCreateFence(GetProcAddressVulkan('vkCreateFence', LibHandleVulkan));
    vkDestroyFence := TvkDestroyFence(GetProcAddressVulkan('vkDestroyFence', LibHandleVulkan));
    vkResetFences := TvkResetFences(GetProcAddressVulkan('vkResetFences', LibHandleVulkan));
    vkGetFenceStatus := TvkGetFenceStatus(GetProcAddressVulkan('vkGetFenceStatus', LibHandleVulkan));
    vkWaitForFences := TvkWaitForFences(GetProcAddressVulkan('vkWaitForFences', LibHandleVulkan));
    vkCreateSemaphore := TvkCreateSemaphore(GetProcAddressVulkan('vkCreateSemaphore', LibHandleVulkan));
    vkDestroySemaphore := TvkDestroySemaphore(GetProcAddressVulkan('vkDestroySemaphore', LibHandleVulkan));
    vkCreateEvent := TvkCreateEvent(GetProcAddressVulkan('vkCreateEvent', LibHandleVulkan));
    vkDestroyEvent := TvkDestroyEvent(GetProcAddressVulkan('vkDestroyEvent', LibHandleVulkan));
    vkGetEventStatus := TvkGetEventStatus(GetProcAddressVulkan('vkGetEventStatus', LibHandleVulkan));
    vkSetEvent := TvkSetEvent(GetProcAddressVulkan('vkSetEvent', LibHandleVulkan));
    vkResetEvent := TvkResetEvent(GetProcAddressVulkan('vkResetEvent', LibHandleVulkan));
    vkCreateQueryPool := TvkCreateQueryPool(GetProcAddressVulkan('vkCreateQueryPool', LibHandleVulkan));
    vkDestroyQueryPool := TvkDestroyQueryPool(GetProcAddressVulkan('vkDestroyQueryPool', LibHandleVulkan));
    vkGetQueryPoolResults := TvkGetQueryPoolResults(GetProcAddressVulkan('vkGetQueryPoolResults', LibHandleVulkan));
    vkCreateBuffer := TvkCreateBuffer(GetProcAddressVulkan('vkCreateBuffer', LibHandleVulkan));
    vkDestroyBuffer := TvkDestroyBuffer(GetProcAddressVulkan('vkDestroyBuffer', LibHandleVulkan));
    vkCreateBufferView := TvkCreateBufferView(GetProcAddressVulkan('vkCreateBufferView', LibHandleVulkan));
    vkDestroyBufferView := TvkDestroyBufferView(GetProcAddressVulkan('vkDestroyBufferView', LibHandleVulkan));
    vkCreateImage := TvkCreateImage(GetProcAddressVulkan('vkCreateImage', LibHandleVulkan));
    vkDestroyImage := TvkDestroyImage(GetProcAddressVulkan('vkDestroyImage', LibHandleVulkan));
    vkGetImageSubresourceLayout := TvkGetImageSubresourceLayout(GetProcAddressVulkan('vkGetImageSubresourceLayout', LibHandleVulkan));
    vkCreateImageView := TvkCreateImageView(GetProcAddressVulkan('vkCreateImageView', LibHandleVulkan));
    vkDestroyImageView := TvkDestroyImageView(GetProcAddressVulkan('vkDestroyImageView', LibHandleVulkan));
    vkCreateShaderModule := TvkCreateShaderModule(GetProcAddressVulkan('vkCreateShaderModule', LibHandleVulkan));
    vkDestroyShaderModule := TvkDestroyShaderModule(GetProcAddressVulkan('vkDestroyShaderModule', LibHandleVulkan));
    vkCreatePipelineCache := TvkCreatePipelineCache(GetProcAddressVulkan('vkCreatePipelineCache', LibHandleVulkan));
    vkDestroyPipelineCache := TvkDestroyPipelineCache(GetProcAddressVulkan('vkDestroyPipelineCache', LibHandleVulkan));
    vkGetPipelineCacheData := TvkGetPipelineCacheData(GetProcAddressVulkan('vkGetPipelineCacheData', LibHandleVulkan));
    vkMergePipelineCaches := TvkMergePipelineCaches(GetProcAddressVulkan('vkMergePipelineCaches', LibHandleVulkan));
    vkCreateGraphicsPipelines := TvkCreateGraphicsPipelines(GetProcAddressVulkan('vkCreateGraphicsPipelines', LibHandleVulkan));
    vkCreateComputePipelines := TvkCreateComputePipelines(GetProcAddressVulkan('vkCreateComputePipelines', LibHandleVulkan));
    vkDestroyPipeline := TvkDestroyPipeline(GetProcAddressVulkan('vkDestroyPipeline', LibHandleVulkan));
    vkCreatePipelineLayout := TvkCreatePipelineLayout(GetProcAddressVulkan('vkCreatePipelineLayout', LibHandleVulkan));
    vkDestroyPipelineLayout := TvkDestroyPipelineLayout(GetProcAddressVulkan('vkDestroyPipelineLayout', LibHandleVulkan));
    vkCreateSampler := TvkCreateSampler(GetProcAddressVulkan('vkCreateSampler', LibHandleVulkan));
    vkDestroySampler := TvkDestroySampler(GetProcAddressVulkan('vkDestroySampler', LibHandleVulkan));
    vkCreateDescriptorSetLayout := TvkCreateDescriptorSetLayout(GetProcAddressVulkan('vkCreateDescriptorSetLayout', LibHandleVulkan));
    vkDestroyDescriptorSetLayout := TvkDestroyDescriptorSetLayout(GetProcAddressVulkan('vkDestroyDescriptorSetLayout', LibHandleVulkan));
    vkCreateDescriptorPool := TvkCreateDescriptorPool(GetProcAddressVulkan('vkCreateDescriptorPool', LibHandleVulkan));
    vkDestroyDescriptorPool := TvkDestroyDescriptorPool(GetProcAddressVulkan('vkDestroyDescriptorPool', LibHandleVulkan));
    vkResetDescriptorPool := TvkResetDescriptorPool(GetProcAddressVulkan('vkResetDescriptorPool', LibHandleVulkan));
    vkAllocateDescriptorSets := TvkAllocateDescriptorSets(GetProcAddressVulkan('vkAllocateDescriptorSets', LibHandleVulkan));
    vkFreeDescriptorSets := TvkFreeDescriptorSets(GetProcAddressVulkan('vkFreeDescriptorSets', LibHandleVulkan));
    vkUpdateDescriptorSets := TvkUpdateDescriptorSets(GetProcAddressVulkan('vkUpdateDescriptorSets', LibHandleVulkan));
    vkCreateFramebuffer := TvkCreateFramebuffer(GetProcAddressVulkan('vkCreateFramebuffer', LibHandleVulkan));
    vkDestroyFramebuffer := TvkDestroyFramebuffer(GetProcAddressVulkan('vkDestroyFramebuffer', LibHandleVulkan));
    vkCreateRenderPass := TvkCreateRenderPass(GetProcAddressVulkan('vkCreateRenderPass', LibHandleVulkan));
    vkDestroyRenderPass := TvkDestroyRenderPass(GetProcAddressVulkan('vkDestroyRenderPass', LibHandleVulkan));
    vkGetRenderAreaGranularity := TvkGetRenderAreaGranularity(GetProcAddressVulkan('vkGetRenderAreaGranularity', LibHandleVulkan));
    vkCreateCommandPool := TvkCreateCommandPool(GetProcAddressVulkan('vkCreateCommandPool', LibHandleVulkan));
    vkDestroyCommandPool := TvkDestroyCommandPool(GetProcAddressVulkan('vkDestroyCommandPool', LibHandleVulkan));
    vkResetCommandPool := TvkResetCommandPool(GetProcAddressVulkan('vkResetCommandPool', LibHandleVulkan));
    vkAllocateCommandBuffers := TvkAllocateCommandBuffers(GetProcAddressVulkan('vkAllocateCommandBuffers', LibHandleVulkan));
    vkFreeCommandBuffers := TvkFreeCommandBuffers(GetProcAddressVulkan('vkFreeCommandBuffers', LibHandleVulkan));
    vkBeginCommandBuffer := TvkBeginCommandBuffer(GetProcAddressVulkan('vkBeginCommandBuffer', LibHandleVulkan));
    vkEndCommandBuffer := TvkEndCommandBuffer(GetProcAddressVulkan('vkEndCommandBuffer', LibHandleVulkan));
    vkResetCommandBuffer := TvkResetCommandBuffer(GetProcAddressVulkan('vkResetCommandBuffer', LibHandleVulkan));
    vkCmdBindPipeline := TvkCmdBindPipeline(GetProcAddressVulkan('vkCmdBindPipeline', LibHandleVulkan));
    vkCmdSetViewport := TvkCmdSetViewport(GetProcAddressVulkan('vkCmdSetViewport', LibHandleVulkan));
    vkCmdSetScissor := TvkCmdSetScissor(GetProcAddressVulkan('vkCmdSetScissor', LibHandleVulkan));
    vkCmdSetLineWidth := TvkCmdSetLineWidth(GetProcAddressVulkan('vkCmdSetLineWidth', LibHandleVulkan));
    vkCmdSetDepthBias := TvkCmdSetDepthBias(GetProcAddressVulkan('vkCmdSetDepthBias', LibHandleVulkan));
    vkCmdSetBlendConstants := TvkCmdSetBlendConstants(GetProcAddressVulkan('vkCmdSetBlendConstants(vulkanGetProcAddress', LibHandleVulkan));
    vkCmdSetDepthBounds := TvkCmdSetDepthBounds(GetProcAddressVulkan('vkCmdSetDepthBounds', LibHandleVulkan));
    vkCmdSetStencilCompareMask := TvkCmdSetStencilCompareMask(GetProcAddressVulkan('vkCmdSetStencilCompareMask', LibHandleVulkan));
    vkCmdSetStencilWriteMask := TvkCmdSetStencilWriteMask(GetProcAddressVulkan('vkCmdSetStencilWriteMask', LibHandleVulkan));
    vkCmdSetStencilReference := TvkCmdSetStencilReference(GetProcAddressVulkan('vkCmdSetStencilReference', LibHandleVulkan));
    vkCmdBindDescriptorSets := TvkCmdBindDescriptorSets(GetProcAddressVulkan('vkCmdBindIndexBuffer', LibHandleVulkan));
    vkCmdBindIndexBuffer := TvkCmdBindIndexBuffer(GetProcAddressVulkan('vkCmdBindIndexBuffer', LibHandleVulkan));
    vkCmdBindVertexBuffers := TvkCmdBindVertexBuffers(GetProcAddressVulkan('vkCmdBindVertexBuffers', LibHandleVulkan));
    vkCmdDraw := TvkCmdDraw(GetProcAddressVulkan('vkCmdDraw', LibHandleVulkan));
    vkCmdDrawIndexed := TvkCmdDrawIndexed(GetProcAddressVulkan('vkCmdDrawIndexed', LibHandleVulkan));
    vkCmdDrawIndirect := TvkCmdDrawIndirect(GetProcAddressVulkan('vkCmdDrawIndirect', LibHandleVulkan));
    vkCmdDrawIndexedIndirect := TvkCmdDrawIndexedIndirect(GetProcAddressVulkan('vkCmdDrawIndexedIndirect', LibHandleVulkan));
    vkCmdDispatch := TvkCmdDispatch(GetProcAddressVulkan('vkCmdDispatch', LibHandleVulkan));
    vkCmdDispatchIndirect := TvkCmdDispatchIndirect(GetProcAddressVulkan('vkCmdDispatchIndirect', LibHandleVulkan));
    vkCmdCopyBuffer := TvkCmdCopyBuffer(GetProcAddressVulkan('vkCmdCopyBuffer', LibHandleVulkan));
    vkCmdCopyImage := TvkCmdCopyImage(GetProcAddressVulkan('vkCmdCopyImage', LibHandleVulkan));
    vkCmdBlitImage := TvkCmdBlitImage(GetProcAddressVulkan('vkCmdBlitImage', LibHandleVulkan));
    vkCmdCopyBufferToImage := TvkCmdCopyBufferToImage(GetProcAddressVulkan('vkCmdCopyBufferToImage', LibHandleVulkan));
    vkCmdCopyImageToBuffer := TvkCmdCopyImageToBuffer(GetProcAddressVulkan('vkCmdCopyImageToBuffer', LibHandleVulkan));
    vkCmdUpdateBuffer := TvkCmdUpdateBuffer(GetProcAddressVulkan('vkCmdUpdateBuffer', LibHandleVulkan));
    vkCmdFillBuffer := TvkCmdFillBuffer(GetProcAddressVulkan('vkCmdFillBuffer', LibHandleVulkan));
    vkCmdClearColorImage := TvkCmdClearColorImage(GetProcAddressVulkan('vkCmdClearColorImage', LibHandleVulkan));
    vkCmdClearDepthStencilImage := TvkCmdClearDepthStencilImage(GetProcAddressVulkan('vkCmdClearDepthStencilImage', LibHandleVulkan));
    vkCmdClearAttachments := TvkCmdClearAttachments(GetProcAddressVulkan('vkCmdClearAttachments', LibHandleVulkan));
    vkCmdResolveImage := TvkCmdResolveImage(GetProcAddressVulkan('vkCmdResolveImage', LibHandleVulkan));
    vkCmdSetEvent := TvkCmdSetEvent(GetProcAddressVulkan('vkCmdSetEvent', LibHandleVulkan));
    vkCmdResetEvent := TvkCmdResetEvent(GetProcAddressVulkan('vkCmdResetEvent', LibHandleVulkan));
    vkCmdWaitEvents := TvkCmdWaitEvents(GetProcAddressVulkan('vkCmdWaitEvents', LibHandleVulkan));
    vkCmdPipelineBarrier := TvkCmdPipelineBarrier(GetProcAddressVulkan('vkCmdPipelineBarrier', LibHandleVulkan));
    vkCmdBeginQuery := TvkCmdBeginQuery(GetProcAddressVulkan('vkCmdBeginQuery', LibHandleVulkan));
    vkCmdEndQuery := TvkCmdEndQuery(GetProcAddressVulkan('vkCmdEndQuery', LibHandleVulkan));
    vkCmdResetQueryPool := TvkCmdResetQueryPool(GetProcAddressVulkan('vkCmdResetQueryPool', LibHandleVulkan));
    vkCmdWriteTimestamp := TvkCmdWriteTimestamp(GetProcAddressVulkan('vkCmdWriteTimestamp', LibHandleVulkan));
    vkCmdCopyQueryPoolResults := TvkCmdCopyQueryPoolResults(GetProcAddressVulkan('', LibHandleVulkan));
    vkCmdPushConstants := TvkCmdPushConstants(GetProcAddressVulkan('vkCmdPushConstants', LibHandleVulkan));
    vkCmdBeginRenderPass := TvkCmdBeginRenderPass(GetProcAddressVulkan('vkCmdBeginRenderPass', LibHandleVulkan));
    vkCmdNextSubpass := TvkCmdNextSubpass(GetProcAddressVulkan('vkCmdNextSubpass', LibHandleVulkan));
    vkCmdEndRenderPass := TvkCmdEndRenderPass(GetProcAddressVulkan('vkCmdEndRenderPass', LibHandleVulkan));
    vkCmdExecuteCommands := TvkCmdExecuteCommands(GetProcAddressVulkan('vkCmdExecuteCommands', LibHandleVulkan));

    //  VK_KHR_swapchain
    vkCreateSwapchainKHR := TvkCreateSwapchainKHR(GetProcAddressVulkan('vkCreateSwapchainKHR', LibHandleVulkan));
    vkDestroySwapchainKHR := TvkDestroySwapchainKHR(GetProcAddressVulkan('vkDestroySwapchainKHR', LibHandleVulkan));
    vkGetSwapchainImagesKHR := TvkGetSwapchainImagesKHR(GetProcAddressVulkan('vkGetSwapchainImagesKHR', LibHandleVulkan));
    vkAcquireNextImageKHR := TvkAcquireNextImageKHR(GetProcAddressVulkan('vkAcquireNextImageKHR', LibHandleVulkan));
    vkQueuePresentKHR := TvkQueuePresentKHR(GetProcAddressVulkan('vkQueuePresentKHR', LibHandleVulkan));

    //  VK_KHR_display_swapchain
    vkCreateSharedSwapchainsKHR := TvkCreateSharedSwapchainsKHR(GetProcAddressVulkan('vkCreateSharedSwapchainsKHR', LibHandleVulkan));

    // WSI functions for Win32
    ///vkCreateWin32SurfaceKHR := TvkCreateWin32SurfaceKHR(GetProcAddressVulkan('vkCreateWin32SurfaceKHR', LibHandleVulkan));
    ///vkGetPhysicalDeviceWin32PresentationSupportKHR := TvkGetPhysicalDeviceWin32PresentationSupportKHR(GetProcAddressVulkan('vkGetPhysicalDeviceWin32PresentationSupportKHR', LibHandleVulkan));

	Result := True;
  end;
end;
end.
